2.17.2: 2011-06-17

net.sf.basedb.core.query
Interface EntityQuery

All Superinterfaces:
HqlQuery, Query
All Known Implementing Classes:
AbstractEntityQuery, DataQuery, ItemQuery, ReporterScoreQuery

public interface EntityQuery
extends HqlQuery

This a HQL query that return enitities, ie. items. The items may be returned in the form of data classes (DataQuery) or in the form of item classes (ItemQuery).

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2010-04-20 10:02:16 +0200 (Tue, 20 Apr 2010) $

Method Summary
 void exclude(Collection<Include> excludes)
           
 void exclude(Include... excludes)
          Specify options for which items to exclude from the result.
 Permission getItemPermission()
          The logged in user's permission on the items returned by this query.
 Item getItemType()
          The type of items the query returns.
 Item getRootType()
          The type of items that is the root of the query.
 void include(Collection<Include> includes)
           
 void include(Include... includes)
          Specify options for which items to include in the result.
 boolean isIncluded(Collection<Include> includes)
           
 boolean isIncluded(Include... includes)
          Check which options are set for the items to include in the result
 void setIncludes(Collection<Include> includes)
          Clears the lists of includes and adds a new collection.
 void setItemPermission(Permission permission)
          Only return items which the logged in user has the specified permission for.
 
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, count, getFirstResult, getMaxResults, getParameterNames, getQueryParameter, getQuerySection, getQueryType, getRootAlias, group, groupPermanent, hasParameterValue, having, havingPermanent, isCounting, isDistinct, isReadonly, isReturningTotalCount, join, joinPermanent, order, orderPermanent, reset, restrict, restrictPermanent, select, selectPermanent, setDistinct, setFirstResult, setMaxResults, setParameter, setPermanentParameter, setReturnTotalCount, toQl
 

Method Detail

getItemType

Item getItemType()
The type of items the query returns.


getRootType

Item getRootType()
The type of items that is the root of the query. In most cases, this is the same as the getItemType(), but not always.

Since:
2.8

include

void include(Include... includes)
Specify options for which items to include in the result.

Parameters:
includes - An array of items that should be included
Throws:
UnsupportedOperationException - If this operation isn't supported by the implementation
See Also:
exclude(Include[])
Developer info
These options are implemented as Hibernate filters. See QueryRuntimeFilterFactory

include

void include(Collection<Include> includes)
See Also:
include(Include[])

setIncludes

void setIncludes(Collection<Include> includes)
Clears the lists of includes and adds a new collection.

Parameters:
includes - The new includes to be hold in the list.
Since:
2.14.2
See Also:
include(Include...)

exclude

void exclude(Include... excludes)
Specify options for which items to exclude from the result.

Parameters:
excludes - An array of options that should be excluded
Throws:
UnsupportedOperationException - If this operation isn't supported by the implementation
See Also:
include(Include[])
Developer info
These options are implemented as Hibernate filters. See QueryRuntimeFilterFactory

exclude

void exclude(Collection<Include> excludes)
See Also:
exclude(Include[])

isIncluded

boolean isIncluded(Include... includes)
Check which options are set for the items to include in the result

Parameters:
includes - The options to check
Returns:
TRUE If all specified options are included, FALSE otherwise

isIncluded

boolean isIncluded(Collection<Include> includes)
See Also:
isIncluded(Include[])

setItemPermission

void setItemPermission(Permission permission)
Only return items which the logged in user has the specified permission for. The default is to return all items which the user has at least read permission for.

Parameters:
permission - The required permission

getItemPermission

Permission getItemPermission()
The logged in user's permission on the items returned by this query.

Returns:
A Permission object

2.17.2: 2011-06-17