creative way for implementing Data object with its corresponding business 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:23 UTC
Read the original article Hit count: 259

Filed under:
|
|

I have a class that need to be serialized (for both persistentcy and client-server communication)

for simplicity's sake let's 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 lose my hierarchy freedom, do any of you have any creative solutions for this problem...

I also reviewed DAO pattern: http://java.sun.com/blueprints/patterns/DAO.html

© Stack Overflow or respective owner

Related posts about java

Related posts about serialization