|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.query.AbstractQueryImpl
org.apache.ojb.broker.query.QueryByIdentity
represents a search by identity. "find the article with id 7" could be represented as: Article example = new Article(); example.setId(7); Query qry = new QueryByIdentity(example); The PersistenceBroker can retrieve Objects by examples as follows: PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker(); Collection col = broker.getObjectByQuery(qry); This Class can also handle working with OJB Identity objects: "find the article with Identity xyz" could be represnted as Identity xyz = new Identity(example); Query qry = new QueryByIdentity(xyz);
Field Summary |
Fields inherited from class org.apache.ojb.broker.query.AbstractQueryImpl |
m_baseClass, m_searchClass, serialVersionUID |
Fields inherited from interface org.apache.ojb.broker.query.Query |
NO_END_AT_INDEX, NO_START_AT_INDEX, NOT_SCROLLABLE, SCROLLABLE |
Constructor Summary | |
QueryByIdentity(java.lang.Object example_or_identity)
QueryByIdentity can be generated from example Objects or by Identity Objects |
Method Summary | |
java.lang.Object |
getExampleObject()
Answer the example Object |
java.lang.Class |
getSearchClass()
Answer the search class. |
Methods inherited from class org.apache.ojb.broker.query.AbstractQueryImpl |
fullSize, fullSize, getBaseClass, getCriteria, getEndAtIndex, getGroupBy, getHavingCriteria, getOrderBy, getPrefetchedRelationships, getStartAtIndex, getWithExtents, isDistinct, setEndAtIndex, setStartAtIndex, setWithExtents, usePaging |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QueryByIdentity(java.lang.Object example_or_identity)
Method Detail |
public java.lang.Object getExampleObject()
getExampleObject
in interface Query
getExampleObject
in class AbstractQueryImpl
public java.lang.Class getSearchClass()
getSearchClass
in interface Query
getSearchClass
in class AbstractQueryImpl
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |