File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes is field or property based annotation same Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "is field or property based annotation same" Watch "is field or property based annotation same" New topic
Author

is field or property based annotation same

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I read there are 2 ways to use annotatin in EJB 3.
field based anotation which we annotate instance variables.
Property based annotation is annotate getters.
Anyway my prblem is that getters returns the values of instance variables.
then why we use 2 ways?
Jaikiran Pai
Saloon Keeper

Joined: Jul 20, 2005
Posts: 6720

There's a good explanation about it here


[My Blog] [JavaRanch Journal]
 
IntelliJ Java IDE
 
subject: is field or property based annotation same
 
Threads others viewed
Enthuware question com.enthuware.ets.scbcd.v5.2.79
AccessMode in JPA 2
The difference between field-based access and property-based access
Use annotation on attribute of a POJO and use that annotation as identifier for logical check
Annotations on instance declaration or get method using JPA in entities?
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture