|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
represents Queries that can be used by the OJB PersistenceBroker to retrieve Objects from the underlying DB. Until now there are two implementations: 1. QueryByCriteria, represents SELECT * FROM ... WHERE ... queries 2. QueryByExample, uses Example objects or OIDs as templates for the db lookup there could additional implementations, e.g for user defined SQL For the Criteria API I reused code from the COBRA project, as you will see by their class comments. I removed all stuff that relies on knowlegde of the DataDictionary or MetaData layer. The Query and Criteria classes thus don't know how to build SQL statements, as in the COBRA original sources. I use the this classes as mere data-structures, that are processed by the OJB Accesslayer (SqlGenerator, JdbcAccess). This design will allow to reuse the ojb.broker.query package in other projects without breaking any references. I hope this will be useful for someone.
Method Summary | |
Criteria |
getCriteria()
return the criteria of the query if present or null. |
java.lang.Object |
getExampleObject()
return the template Object if present or null |
java.lang.Class |
getSearchClass()
return the target class, representing the extend to be searched |
boolean |
isDistinct()
return true if select DISTINCT should be used |
Method Detail |
public Criteria getCriteria()
public java.lang.Object getExampleObject()
public java.lang.Class getSearchClass()
public boolean isDistinct()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |