public class QueryByIdentity extends AbstractQueryImpl
Article example = new Article();
example.setId(7);
Query qry = new QueryByIdentity(example);
PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker();
Collection col = broker.getObjectByQuery(qry);
Article example = new Article();
example.setId(7);
Identity xyz = broker.serviceIdentity().buildIdentity(example);
Query qry = new QueryByIdentity(xyz);
Collection col = broker.getObjectByQuery(qry);
Identity xyz = broker.serviceIdentity().buildIdentity(Article.class, new Integer(7));
Collection col = broker.getObjectByIdentity(xyz);
NO_END_AT_INDEX, NO_START_AT_INDEX, NOT_SCROLLABLE, SCROLLABLE
Constructor and Description |
---|
QueryByIdentity(java.lang.Object example_or_identity)
QueryByIdentity can be generated from example Objects or by Identity Objects
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getExampleObject()
Answer the example Object
|
java.lang.Class |
getSearchClass()
Answer the search class.
|
fullSize, fullSize, getBaseClass, getCriteria, getEndAtIndex, getFetchSize, getGroupBy, getHavingCriteria, getOrderBy, getPrefetchedRelationships, getStartAtIndex, getWithExtents, isDistinct, setEndAtIndex, setFetchSize, setStartAtIndex, setWithExtents, usePaging
public QueryByIdentity(java.lang.Object example_or_identity)
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
(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30