Interface PublicationItemQuery
- All Superinterfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intLargest number of ids accepted byids(Collection). -
Method Summary
Modifier and TypeMethodDescriptionlongcount()Counts the matching items, ignoring paging.firstResult(int firstResult) Skips the given number of items, for paging.ids(Collection<String> ids) Restricts the query to items with the given ids.includeDeleted(boolean includeDeleted) Also returns items in the trash.Restricts the query to items whose label contains the given text.maxResults(int maxResults) Returns at most the given number of items, for paging.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.types(Collection<PublicationItemType> types) Restricts the query to items of the given types.Methods inherited from interface com.priint.pubserverapi.query.QueryBuilder
list, singleResult
-
Field Details
-
MAX_IDS
static final int MAX_IDSLargest number of ids accepted byids(Collection).- See Also:
-
-
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 mostMAX_IDS- Returns:
- the current
PublicationItemQueryinstance for method chaining
-
labelLike
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
PublicationItemQueryinstance 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
PublicationItemQueryinstance for method chaining
-
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
PublicationItemQueryinstance for method chaining
-
readableBy
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
PublicationItemQueryinstance for method chaining
-
firstResult
Skips the given number of items, for paging.- Parameters:
firstResult- number of items to skip- Returns:
- the current
PublicationItemQueryinstance for method chaining
-
maxResults
Returns at most the given number of items, for paging.- Parameters:
maxResults- largest number of items to return- Returns:
- the current
PublicationItemQueryinstance for method chaining
-
count
long count()Counts the matching items, ignoring paging.- Returns:
- number of matching items
-