|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.AbstractQuery net.sf.basedb.core.AbstractHqlQuery net.sf.basedb.core.AbstractEntityQuery net.sf.basedb.core.ItemQuery<I>
public class ItemQuery<I extends BasicItem>
An implementation of the Query
interface that returns item
objects. This type of query is used for all items except those that
are batchable, for example reporters and raw data. The result of a
query can be returned as a list or an iterator.
Field Summary | |
---|---|
private Class<? extends BasicData> |
dataClass
The data layer class of the item objects that are returned. |
private Class<I> |
itemClass
The class of the item objects that are returned. |
Constructor Summary | |
---|---|
ItemQuery(Class<I> itemClass)
Create a new query for the specified item, using the default optional runtime filter. |
|
ItemQuery(Class<I> itemClass,
QueryRuntimeFilter optionalFilter)
Create a new query for the specified item, using a non-default optional runtime filter. |
Method Summary | |
---|---|
ItemResultIterator<I> |
iterate(DbControl dc)
Execute the query and return the results as an iterator. |
ItemResultList<I> |
list(DbControl dc)
Execute the query and return the results as a list. |
Methods inherited from class net.sf.basedb.core.AbstractEntityQuery |
---|
count, disableFilters, enableFilters, exclude, exclude, getItemPermission, getItemType, getQueryType, getRootType, group, groupPermanent, having, havingPermanent, include, include, isIncluded, isIncluded, select, selectPermanent, setAutoJoinType, setIncludes, setItemPermission |
Methods inherited from class net.sf.basedb.core.AbstractHqlQuery |
---|
getCountHqlQuery, getMainHqlQuery, getRootAlias, isCachingResult, isReadonly, isStateless, postProcessQuery, reset, setCacheResult, setEntityParameter, setPermanentEntityParameter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.query.HqlQuery |
---|
isCachingResult, setCacheResult, setEntityParameter, setPermanentEntityParameter |
Methods inherited from interface net.sf.basedb.core.query.Query |
---|
addAutoJoiner, getFirstResult, getMaxResults, getParameterNames, getQueryParameter, getQuerySection, getRootAlias, hasParameterValue, isCounting, isDistinct, isReadonly, isReturningTotalCount, join, joinPermanent, order, orderPermanent, reset, restrict, restrictPermanent, setDistinct, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, toQl |
Field Detail |
---|
private final Class<I extends BasicItem> itemClass
private final Class<? extends BasicData> dataClass
Constructor Detail |
---|
ItemQuery(Class<I> itemClass)
itemClass
- The class of the item objects that are returnedItemQuery(Class<I> itemClass, QueryRuntimeFilter optionalFilter)
itemClass
- The class of the item objects that are returnedoptionalFilter
- A runtime filter replacing the default optional filter
or null to not use any optional filterMethod Detail |
---|
public ItemResultList<I> list(DbControl dc) throws BaseException
dc
- The DbControl
used to access the database
and check permissions
BaseException
- If there is an errorpublic ItemResultIterator<I> iterate(DbControl dc) throws BaseException
dc
- The DbControl
used to access the database
and check permissions
BaseException
- If there is an error
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |