Creating Finder Methods

Finders are methods that are used to get information from a specific EJB instance. They are similar to a stored query, like a SQL SELECT statement. Only entity beans can have finders.

Creating Finders

The EJB Module Editor for a CMP Entity Bean has a tab labeled Finders .

To open the Finders page:

  1. On an EJB diagram or from the System Navigator, double-click a CMP entity EJB to open the EJB Module Editor.
  2. Expand the node for the entity bean you are editing.
  3. Click the Methods node.
  4. From the Method Category list, select Finder methods.
  5. Click Add to create a new finder method.

Default-generated Finders

The following finder methods are generated by default by the wizards.

Adding Finders

To add a new Finder method, click the Add button. The Create CMP Finder Method dialog box opens, where you can edit the method, its parameters, and the exceptions it throws.

For more information on using this page, click Help or press the F1 key.


Related topics

Developing Enterprise JavaBeans

 

 

 

Copyright © 1997, 2004, Oracle. All rights reserved.