Writing EJB-QL for CMP Finders

The EJB-QL language is based on SQL-92 and should be familiar to database users. EJB-QL is used for finders and ejbSelect methods. Finder methods always return the entity bean's remote interface or a Collection containing remote interfaces.

Select methods are like finder methods, but they can return any of the container-managed fields. Select methods are not exposed in the remote interface and are called against an identified instance. Finders run against an anonymous instance. A select method is similar to a data access method on a stateless session bean. The advantage of using an ejbSelect method is that the query operates on the container-managed fields and relationships and is independent of the physical schema. ...

Get J2EE™ Applications and BEA™ WebLogic Server™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.