Skip Headers

# Predefined CMP Finders

Previous

Next

Table: Predefined CMP Finders lists the predefined finders you can use with TopLink CMP (using OC4J or BEA WebLogic Server).

The TopLink runtime reserves the method names listed in Table: Predefined CMP Finders.

Predefined CMP Finders

Method | Arguments | Return
--- | --- | ---
`findAll` | `()` | `Collection`
`findManyByEJBQL` | (`String ejbql) (String ejbql, Vector arguments)` | `Collection`
`findManyByQuery` | `(DatabaseQuery query)``(DatabaseQuery query, Vector arguments)` | `Collection`
`findManyBySQL` | `(String sql)``(String sql, Vector arguments)` | `Collection`
`findByPrimaryKey` | `(Object primaryKeyObject)` | `EJBObject`
`findOneByEJBQL` | (`String ejbql) (String ejbql, Vector arguments)` | `EJBObject`
`findOneByQuery` | `(DatabaseQuery query)``(DatabaseQuery query, Vector arguments)` | `EJBObject`
`findOneBySQL` | `(String sql)``(String sql, Vector arguments)` | `EJBObject`

Note: If the finder is located on a local home, replace `EJBObject` with `EJBLocalObject` in finders that contain `findOneBy`.

You can also use each of these finders without a vector of arguments. For example, `EJBObject findOneByEJBQL(String ejbql)` is a valid dynamic finder, but you must replace the return type of `EJBObject` with your bean's component interface.

For more information, see "Using EJB Finders".