|
2.10.0: 2009-02-24 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.AbstractQuery
net.sf.basedb.core.AbstractEntityQuery
net.sf.basedb.core.DataQuery<I>
public class DataQuery<I extends BasicData>
An implementation of the Query
interface that returns data
objects. This type of query is only used for batchable items,
like reporters and raw data.
Field Summary | |
---|---|
private Class<I> |
dataClass
The class of the data objects that are returned. |
Constructor Summary | |
---|---|
DataQuery(Class<I> dataClass,
Item rootType,
String rootName,
String select)
Create a query that may have different return type and root entity. |
|
DataQuery(Class<I> dataClass,
String entityName)
Create a new query for the specified item, using the default optional runtime filter. |
|
DataQuery(Class<I> dataClass,
String entityName,
QueryRuntimeFilter optionalFilter)
Create a new query for the specified item, using a non-default optional runtime filter. |
Method Summary | |
---|---|
DataResultIterator<I> |
iterate(DbControl dc)
Execute the query and return the results as an iterator. |
Methods inherited from class net.sf.basedb.core.AbstractEntityQuery |
---|
count, disableFilters, enableFilters, exclude, exclude, getCountHqlQuery, getItemPermission, getItemType, getMainHqlQuery, getQueryType, getRootAlias, getRootType, group, groupPermanent, having, havingPermanent, include, include, isCachingResult, isIncluded, isIncluded, isReadonly, isStateless, reset, select, selectPermanent, setAutoJoinType, setCacheResult, setItemPermission |
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.Query |
---|
addAutoJoiner, getFirstResult, getMaxResults, getParameterNames, getQueryParameter, getQuerySection, hasParameterValue, isCounting, isDistinct, isReturningTotalCount, join, joinPermanent, order, orderPermanent, restrict, restrictPermanent, setDistinct, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, toQl |
Field Detail |
---|
private final Class<I extends BasicData> dataClass
Constructor Detail |
---|
DataQuery(Class<I> dataClass, String entityName)
dataClass
- The class of the data objects that are returnedDataQuery(Class<I> dataClass, Item rootType, String rootName, String select)
new DataQuery(ReporterData.class, Item.FEATURE, null, "reporter")
.
This will be translated to something like (in HQL):
SELECT ftr.reporter FROM FeatureData ftr ...
dataClass
- The class of the data objects that are returnedrootType
- The root item type of the queryrootName
- The root enitity name, or null to use
the class name of the root typeselect
- The HQL property that we should select on the root
type to get to the return typeDataQuery(Class<I> dataClass, String entityName, QueryRuntimeFilter optionalFilter)
dataClass
- The class of the data objects that are returnedoptionalFilter
- A runtime filter replacing the default optional filter
or null to not use any optional filterMethod Detail |
---|
public DataResultIterator<I> iterate(DbControl dc) throws BaseException
dc
- The DbControl
used to access the database
and check permissions
BaseException
- If there is an error
|
2.10.0: 2009-02-24 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |