This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes @Embedded annotation for properties. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "@Embedded annotation for properties." Watch "@Embedded annotation for properties." New topic

@Embedded annotation for properties.

Kenneth Lomvey
Ranch Hand

Joined: Nov 08, 2008
Posts: 94
When we used the @Embedded annotation for property accessor methods in an entity, should we use it to both getter method or setter method? Or, is it enough to annotate only the getter method?
Tomaszz Lewandowski
Ranch Hand

Joined: Sep 07, 2007
Posts: 30
You MUST annotatate getter accesor only.

Regards<br />Tomasz Lewandowski<br />SCJP5 (97%) | SCWCD5 (98%)
Kenneth Lomvey
Ranch Hand

Joined: Nov 08, 2008
Posts: 94
Thanks Tomaszz.
I agree. Here's the link:
subject: @Embedded annotation for properties.
Similar Threads
Mapping annotations for variables.
annotation on the property or access method?
Question on MTOM - The image is returned inline instead of an attachment.
Annotation doubt
getter and setter generation with annotations