Get your CodeRanch badge!*
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
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
Annotation doubt
annotation on the property or access method?
getter and setter generation with annotations
Question on MTOM - The image is returned inline instead of an attachment.
Mapping annotations for variables.