Interface PublicationItemQuery

All Superinterfaces:
QueryBuilder<PublicationItem>

public interface PublicationItemQuery extends QueryBuilder<PublicationItem>
Query for publications, folders and documents together, as the publication tree shows them. Filtering, rights, ordering by id and paging are done by the database, so only the requested rows are loaded.

Document templates are never returned. Unless includeDeleted(boolean) is set, items in the trash are not returned either.

  • Field Details

  • Method Details

    • ids

      Restricts the query to items with the given ids. An empty collection matches nothing.
      Parameters:
      ids - ids of publications, folders or documents, at most MAX_IDS
      Returns:
      the current PublicationItemQuery instance for method chaining
    • labelLike

      PublicationItemQuery labelLike(String label)
      Restricts the query to items whose label contains the given text. The text is matched literally (% and _ are not wildcards) and case-insensitively.
      Parameters:
      label - text the label contains
      Returns:
      the current PublicationItemQuery instance for method chaining
    • types

      Restricts the query to items of the given types. Null or an empty collection means all types.
      Parameters:
      types - types of the items
      Returns:
      the current PublicationItemQuery instance for method chaining
    • includeDeleted

      PublicationItemQuery includeDeleted(boolean includeDeleted)
      Also returns items in the trash. Default false. Items not in the trash come first, then the deleted ones, each in id order.
      Parameters:
      includeDeleted - true to return deleted items too
      Returns:
      the current PublicationItemQuery instance for method chaining
    • readableBy

      PublicationItemQuery readableBy(String personId)
      Restricts the query to items the person may read: items on which the person, or one of the person's teams, has the read or the write right.
      Parameters:
      personId - id of the person
      Returns:
      the current PublicationItemQuery instance for method chaining
    • firstResult

      PublicationItemQuery firstResult(int firstResult)
      Skips the given number of items, for paging.
      Parameters:
      firstResult - number of items to skip
      Returns:
      the current PublicationItemQuery instance for method chaining
    • maxResults

      PublicationItemQuery maxResults(int maxResults)
      Returns at most the given number of items, for paging.
      Parameters:
      maxResults - largest number of items to return
      Returns:
      the current PublicationItemQuery instance for method chaining
    • count

      long count()
      Counts the matching items, ignoring paging.
      Returns:
      number of matching items