This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
When field access is used, fields are persisted no matter what visibility they have for fields, but are not when they are annotated @Transient or the are transient (java keyword used for serialization).
For getter / setter access, only @Transient can be applied, and the methods must be public or protected.
(point 2.1.1 in the specs).
Joined: Nov 12, 2008
So, this question is asking about "property" access which means the getter/setter methods. In that case, if those methods has a private access, it wouldn't be persisted. Am I right? So is this an errata?
Treimin Clark wrote:So, this question is asking about "property" access which means the getter/setter methods. In that case, if those methods has a private access, it wouldn't be persisted. Am I right? So is this an errata?
No, property does not mean getter/setter, it does mean field which has getter/setter.
I think that getter/setter need to be public or protected because JPA just doesn't support package-private and private, getter/setter.
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com