Hi
The finder Queries are used to find already existing data in the Persistent store.
If u use CMP entity beans, u don't need to implement any finder methods.
u have to specify them in the Home interface of the corresponding Entity bean and the appropriate
EJB Query in the ejb-jar.xml file.
The container will implement the method for u.
But u should define an abstract method in the Entity bean class with return type as the primary key class or collection of such.
In case if u use BMP, then u should provide the implementation for the finder methods ur own data access logic.
Here again the return type should be primary key class or a collection of such.
Actually u return the primary key class to the container and the container in turn will create the required EJB objects and send it back to the client.
Remember, u can't access the EJB directly.
Also every entity bean should provide atleast one finder method called findByPrimarykey(Object) whether its CMP/BMP.
I hope u r a bit clear by now.
If u have any doubts, please do mail me at
sathishkk@planetasia.com Thanx
Sathish
Originally posted by ALaxmi Shankaran:
I just started with the Entity bean....
Can anyone tell me regardig the finder methods that is the
findByPrimary key(object) is declared in the home interface....
So how the client get that???