Re: Generate DTO from JPA annotated class
Konstantin Priblouda <[email protected]> Fri, 3 Jul 2009 05:44:54 -0700 (PDT)
| Newsgroups | gmane.comp.java.xdoclet.user |
|---|---|
| Message-ID | <[email protected]> |
In any case, you will need to know which fields are persistent - and this information lives in hibernate tags. regards, ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- JTec quality components: http://www.pribluda.de/projects/ --- On Fri, 7/3/09, Shay Matasaro <[email protected]> wrote: > From: Shay Matasaro <[email protected]> > Subject: Re: [Xdoclet-user] Generate DTO from JPA annotated class > To: "End-user support for the XDoclet code generator" <xdoclet-user@lists= .sourceforge.net> > Date: Friday, July 3, 2009, 3:00 PM > Hi, > = > I think that i dont really need to process and hibernate > specific tags, = > just replicate the class , and have control over which > fields and = > methods get replicates , i would also like to generate a > copy = > constructor for both classes. > = > = > here is an example: > = > = > original class: > = > Package=A0 sever; > = > @Entity > Class Customer > { > String name; > = > = > @do not replicate > String Password > = > getters and setters.... > = > } > = > = > replicated class > = > Package=A0 client; > = > Class Customer > { > String name; > = > Customer(server.customer from) > { > .... > } > = > getters and setters.... > = > } > = > = > Thanks, > Shay > Konstantin Priblouda wrote: > > XDoclet s the right tool to do this, but it does not > process = > > anotations,=A0 but xdoclet ( kind-of javadoc ) tags > instead. > > > > To achieve your task you can start from existing > hibernate plugin, > > reuse its tag definitions and create your own velocity > template. > > > > regars, > > > > > > ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- > > JTec quality components: http: fields > //www.pribluda.de/projects/ > > > > > > --- On Thu, 7/2/09, Shay Matasaro <[email protected]> > wrote: > > > >=A0=A0=A0 > >> From: Shay Matasaro <[email protected]> > >> Subject: [Xdoclet-user] Generate DTO from JPA > annotated class > >> To: [email protected] > >> Date: Thursday, July 2, 2009, 3:21 PM > >> Hi All, > >> > >> I am looking for a utility that can take a JPA > annotated = > >> class(hibernate) and generate a DTO(Value object) > class > >> from it. > >> > >> while doing my research i ran into the Value > Object > >> implementation of = > >> XDoclet which looks great. > >> > >> my question is, Is there an XDoclet implementation > that can > >> handle a JPA = > >> class in a similar manner to the way that Value > Object > >> handles EJB classes? > >> > >> Thanks, > >> Shay > >> > >> > -------------------------------------------------------------------------= ----- > >> _______________________________________________ > >> xdoclet-user mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/xdoclet-user > >> > >>=A0 =A0=A0=A0 > > > > > >=A0 =A0 =A0=A0=A0 > > > > > -------------------------------------------------------------------------= ----- > > _______________________________________________ > > xdoclet-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > > > >=A0=A0=A0 > = > = > -------------------------------------------------------------------------= ----- > _______________________________________________ > xdoclet-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > = = ---------------------------------------------------------------------------= ---