-
1. Re: Custome finder method in JBOSS 3.2.2
vashistvishal Oct 16, 2003 8:11 AM (in response to ranaaich)You can write a finder methods in to ways for a primary key.
Single-Object Finder Methods
----------------------------------
In Home interface:
Account findByPrimaryKey(AccountPK pk)
In Bean.
public AccountPK ejbFindByPrimaryKey (AccountPK pk)
Multiple -Object Finder Methods
------------------------------------
In bean
public java.uiti.lCollection ejbFindByPrimary Key(AccountPK pk)
Ejb Spec 10.5.2 and 10.5.6
-------------------------------
Also
From Ejb specs 10.5.6
-------------------------
An entity bean s home interface defines one or more finder methods[20], one for each way to find an entity object or collection of entity objects within the home. The name of each finder method starts with the prefix find , such as findLargeAccounts. The arguments of a finder method are
used in the implementation of the query for the finder method to locate the requested entity objects. Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor. The entity Bean Provider declaratively specifies the EJB QL finder query and associates it with the finder method in the deployment descriptor. A finder method is normally characterized by an EJB QL query string specified in the query element.
Also have a look at
http://www.tusc.com.au/tutorial/html/chap6.html
I hope all this helps,
Vishal