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: 2015-05-12 09:25:48 +0200 (ti, 12 maj 2015) $
  • Method Details

    • 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[])
    • 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[])
    • 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
    • idList

      List<Integer> idList​(DbControl dc)
      Execute the query and return the ID values of all items matching the query.
      Parameters:
      dc - The DbControl used to access the database and check permissions
      Throws:
      BaseException - If there is an error
      Since:
      3.5