The POJO for wrapping the JPA Entity

Regarding to my opinion, there are 2 types of entity attributes (fields). The one must be persisted at the storage, the data base is an example, the another one is the temporary which is available for each business, the calculated attributes(fields), the age which is calculated from the date of birth for example.

Since it is a quick travel for updating and capturing the new technology, I do not have enough time to move further to the JPA Entity inheritance. I decide to create a wrapping class which contains the JPA Entity as its attribute and adding the other attributes which is a temporary entity attributes (fields). I will use it as a data bean for integrating among my application from end-to-end, the presentation layer through the JPA layer.

I hope I may have more time to come back to this state and investigating further about the good practice for the extended JPA entity.


About Charlee Chitsuk

I've been working as a software developer since 1998. At the moment I focus on system integration including with SOA and Enterprise Security Solution.

Posted on June 24, 2010, in JPA and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: