Interface MTDocumentQuery
- All Superinterfaces:
MTContextQuery
,MTDateFilterQuery
,MTMissingTranslationsQuery
,MTPatternQuery
,MTQuery
,MTSortableQuery
public interface MTDocumentQuery
extends MTQuery, MTDateFilterQuery, MTPatternQuery, MTSortableQuery, MTMissingTranslationsQuery, MTContextQuery
-
Nested Class Summary
Nested classes/interfaces inherited from interface se.conciliate.extensions.store.query.MTQuery
MTQuery.ResultContext, MTQuery.SortColumn, MTQuery.State
-
Method Summary
Modifier and TypeMethodDescriptionSelects documents by their ID.Selects documents by executing a list.Selects all documents in the workspace.selectByNamedQuery
(MTNamedQuery namedQuery) Selects from a named query.selectByUUID
(List<String> uuids) Selects documents by their UUID.Selects all documents that are not connected to any models or symbols.sort
(MTQuery.SortColumn sortColumn, boolean ascending, MTLanguage language, Locale locale) Sorts the selected documents.storeContexts
(MTQuery.ResultContext... contexts) Stores the selected contexts for the results of the query, for filtering and grouping of results.withChangesSince
(Date date) Excludes documents that have not been modified since a given date.withCreators
(MTUserHeader... creators) Retains only documents with at least one of the given users set as creator of the model.withDocumentRoots
(boolean includeNoRoots, MTVariable... roots) Retains only documents that are using at least one of the given document roots.withGroups
(MTGroupHeader... groups) Retains only documents with at least one of the given groups set as group of the document.withLastModifiedBy
(MTUserHeader... modifiers) Retains only documents that was last modified by one of the given userswithOwners
(MTUserHeader... owners) Retains only documents with at least one of the given users set as owner of the model.withPattern
(String pattern, MTLanguage language, boolean exactMatch, boolean ignoreCase) Excludes results where the title does not containpattern
as a substring.withTypes
(boolean includeNoDocumentTypes, MTDocumentTypeHeader... type) Exclude all documents that does not have one of the given types.Methods inherited from interface se.conciliate.extensions.store.query.MTContextQuery
storeContextsLockedRevisions
Methods inherited from interface se.conciliate.extensions.store.query.MTMissingTranslationsQuery
withMissingTranslations
Methods inherited from interface se.conciliate.extensions.store.query.MTQuery
attributeTypes, clear, colorSchemes, documents, documentSources, documentTypes, entityProperties, execute, getResultTypes, getState, images, layerTypes, lists, models, pluginData, publishProfiles, serialize, subscribers, symbols, timestamps, users, variables, workspacePluginData
-
Method Details
-
selectAll
MTDocumentQuery selectAll()Selects all documents in the workspace. -
selectUnused
MTDocumentQuery selectUnused()Selects all documents that are not connected to any models or symbols. -
select
Selects documents by their ID.- Parameters:
ids
- The ID:s of the documents to select.
-
selectByUUID
Selects documents by their UUID.- Parameters:
uuids
- The UUIDS:s of the documents to select.
-
select
Selects documents by executing a list.- Parameters:
list
- The list to execute.- Throws:
IllegalArgumentException
- Iflist.getResultType() != MTList.ResultType.DOCUMENT
.
-
selectByNamedQuery
Selects from a named query. This way you can base queries on other named queries and filter them further.- Parameters:
namedQuery
- The named query to base this query on.
-
withTypes
Exclude all documents that does not have one of the given types.- Parameters:
includeNoDocumentTypes
- If true then documents with no types will be included in the result.type
- The types to include
-
withPattern
MTDocumentQuery withPattern(String pattern, MTLanguage language, boolean exactMatch, boolean ignoreCase) Excludes results where the title does not containpattern
as a substring.- Specified by:
withPattern
in interfaceMTPatternQuery
- Parameters:
pattern
- The pattern to search for.language
- The language of the title to find the pattern in.exactMatch
- Require the pattern to match the title exactly rather than containing the pattern.ignoreCase
- Ignores case. This makes "exact match" check lowercase strings for equality and "contains match" check lowercase for contains.
-
sort
MTDocumentQuery sort(MTQuery.SortColumn sortColumn, boolean ascending, MTLanguage language, Locale locale) Sorts the selected documents.- Specified by:
sort
in interfaceMTSortableQuery
- Parameters:
sortColumn
- The column to sort byascending
- true for ascending order, false for descendinglanguage
- The language to sort bylocale
- the locale to use when sorting
-
withChangesSince
Excludes documents that have not been modified since a given date.- Specified by:
withChangesSince
in interfaceMTDateFilterQuery
- Parameters:
date
- The date to compare against.
-
withCreators
Retains only documents with at least one of the given users set as creator of the model.- Parameters:
creators
- The accepted creators.
-
withOwners
Retains only documents with at least one of the given users set as owner of the model.- Parameters:
owners
- The accepted owners.
-
withGroups
Retains only documents with at least one of the given groups set as group of the document.- Parameters:
groups
- The accepted groups.
-
withLastModifiedBy
Retains only documents that was last modified by one of the given users- Parameters:
modifiers
- The accepted modifiers.
-
withDocumentRoots
Retains only documents that are using at least one of the given document roots.- Parameters:
includeNoRoots
- If true then documents with no document roots will be included.roots
- The accepted roots.
-
storeContexts
Description copied from interface:MTContextQuery
Stores the selected contexts for the results of the query, for filtering and grouping of results.- Specified by:
storeContexts
in interfaceMTContextQuery
-