Help coderanch get a
new server
by contributing to the fundraiser

Braj Kishore

Greenhorn
+ Follow
since Dec 13, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Braj Kishore

Finder and select methods use EJB QL queries to return objects and state information of entity beans using container-managed persistence.

A select method is similar to a finder method in the following ways:

1. A select method can return a local or remote interface (or a collection of interfaces).
2. A select method queries a database.
3. The deployment descriptor specifies an EJB QL query for a select method.
4. The entity bean class does not implement the select method.

However, a select method differs significantly from a finder method:

1. A select method can return a persistent field (or a collection thereof) of a related entity bean. A finder method can return only a local or remote interface (or a collection of interfaces).
2. Because it is not exposed in any of the local or remote interfaces, a select method cannot be invoked by a client. It can be invoked only by the methods implemented within the entity bean class. A select method is usually invoked by either a business or a home method.
3. A select method is defined in the entity bean class. For bean-managed persistence, a finder method is defined in the entity bean class, but for container-managed persistence it is not.