Hi all,

I'm using JPA as persistence layer, and one of my modules contains
more then 50 entities.
Almost all of those entities (POJO) I must somehow show in UI.
But in UI some POJOs should have extra fields - value for this fields
is generated according to business logic, so the value is not a part
of actual entity.

Simple Example

CorePojo
   int a;
   int b;
   int generatedValue = businessFunction.(a,b);
 ....

I dont like approach when this "generated" value is being added to
core POJO with @Transient mark - on other hand I dont' want to create
in my JSF application copy of every original POJO with extra fields.
So the only one way which I see now - create new POJO for UI which
extends CorePojo and adds needed fields.

So my question is:
does someone come accross with same situation? How it can be resolved?

Reply via email to