Container-Managed Persistence Changes

   

EJB Query Language

The biggest problem with finder methods in EJB 1.1 was that every vendor offered a unique way to implement them. The standard support for relationships between entity beans in EJB 2.0 CMP and the introduction of the abstract persistence schema have made it possible to change this. Finder methods are now defined using a syntax derived from SQL92 known as the EJB Query Language (EJB QL). It's up to the container to translate this standard format into the target language of the underlying data store. If you're comfortable with SQL, writing queries for finder methods will come naturally to you. More importantly, your finder method queries will be supported by any EJB 2.0 container. In addition, support has been added for select methods, which allow entities that use CMP to execute internal queries using EJB QL. These methods can make use of container-managed relationships to retrieve related entities or specific data values associated with them.

For more information on EJB QL, see "What Is the EJB Query Language?" p. 218 .



Special Edition Using Enterprise JavaBeans 2.0
Special Edition Using Enterprise JavaBeans 2.0
ISBN: 0789725673
EAN: 2147483647
Year: 2000
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net