creative way for implementing Data object with it's corespanding buisness logic class in java
Posted
by ekeren
on Stack Overflow
See other posts from Stack Overflow
or by ekeren
Published on 2010-04-25T22:11:37Z
Indexed on
2010/04/25
22:13 UTC
Read the original article
Hit count: 292
I have a class that need to be serialized (for both persistentcy and client-server communication)
for simplicity reasons lets call the classes Business a BusinessData and I prefix for their Interfaces. All the getter and setter are delegated from Business class to BusinessData class.
I thought about implementing IBusinessData interface that will contain all the getter and setters and IBusiness interface that will extend it.
I can either make Business extend BuisnessData so I will not need to implement all getter and setter delegates, or make some abstract class ForwardingBusinessData that will only delegate getter and setters.
Any of the above option I loose my hierarchy freedom, does any of you have any creative solution for this problem...
I also reviewed DAO pattern: http://java.sun.com/blueprints/patterns/DAO.html
© Stack Overflow or respective owner