A select method, like a finder method, uses
EJB QL or WebLogic QL queries. Unlike find methods, select methods
can only be used internally by the entity bean and are never defined in the
bean's interfaces. A select method is
declared as an abstract method in the CMP entity bean class, and has
an @ejbgen:select tag describing the associated
query.
To Add a Select Method
- Make sure that the entity bean is displayed in Design View.
- Right-click the right-hand area of the bean, and choose Add EJBSelect.
The Add EJBSelect dialog appears.
- Enter the correct method name and signature.
Remember that the method name must have the ejbSelect prefix.
- Enter EJB QL or WebLogic QL query syntax.
Click OK. For more information on this query syntax, see
Query Methods and EJB QL.
- Click the method name to examine the code in Source View.
Related Topics
How Do I: Add a Home Method to an Entity
Bean?
How Do I: Add a Finder Method to
an Entity Bean?
Query Methods and EJB QL
Developing Enterprise JavaBeans