Interface MTModelQuery
- All Superinterfaces:
MTDateFilterQuery
,MTMissingTranslationsQuery
,MTPatternQuery
,MTQuery
,MTSortableQuery
public interface MTModelQuery
extends MTQuery, MTDateFilterQuery, MTPatternQuery, MTSortableQuery, MTMissingTranslationsQuery
-
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 model by their ID.Selects models by executing a list.Selects all models in the workspace.selectByNamedQuery
(MTNamedQuery namedQuery) Selects from a named query.selectByUUID
(List<String> uuids) Selects models by their UUID.selectSubset
(List<Long> roots, boolean onlyOwning) Selects a subset of models by following breakdowns from a set of "root" models.selectSubsetByUUID
(List<String> roots, boolean onlyOwning) Selects a subset of models by following breakdowns from a set of "root" models.sort
(MTQuery.SortColumn sortColumn, boolean ascending, MTLanguage language, Locale locale) Sorts the selected models.withApprovers
(boolean includeNoApprovers, MTUserHeader... approvers) Retains only models with at least one of the given users set as approver of the model.withAttributeValues
(MTAttributeFilter filter) Retains only models with selected attribute values.withChangesSince
(Date date) Excludes models that have not been modified since a given date.withCreators
(MTUserHeader... creators) Retains only models with at least one of the given users set as creator of the model.withDocuments
(Document.DocumentID... documents) Retains only models with at least one of the given documents connected to it.withGroups
(MTGroupHeader... groups) Retains only models with at least one of the given groups set as group of the model.withLastModifiedBy
(MTUserHeader... modifiers) Retains only models that was last modified by one of the given userswithLockedRevisions
(boolean includeInitialRevisions) Retains only locked revisions of models.withMaintainers
(boolean includeNoMaintainers, MTUserHeader... maintainers) Retains only models with at least one of the given users set as maintainer of the model.withOwners
(MTUserHeader... owners) Retains only models 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.withReviewers
(boolean includeNoReviewer, MTUserHeader... reviewers) Retains only models with at least one of the given users set as reviewer of the model.withSubscribers
(boolean includeNoSubscriber, MTSubscriber... subscribers) Retains only models with at least one of the given subscribers set as subscriber of the model.Exclude all models that does not have one of the given types.withWorkflowStates
(WorkflowState... states) Retains only models with the given workflow states.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
MTModelQuery selectAll()Selects all models in the workspace. -
select
Selects model by their ID.- Parameters:
ids
- The ID:s of the models to select.
-
selectByUUID
Selects models by their UUID.- Parameters:
uuids
- The UUID:s of the models to select.
-
select
Selects models by executing a list.- Parameters:
list
- The list to execute.- Throws:
IllegalArgumentException
- Iflist.getResultType() != MTList.ResultType.MODEL
.
-
selectSubset
Selects a subset of models by following breakdowns from a set of "root" models.- Parameters:
roots
- the ID:s of the root modelsonlyOwning
- If true, breakdowns are only followed for symbol that is marked as "owned" by models.
-
selectSubsetByUUID
Selects a subset of models by following breakdowns from a set of "root" models.- Parameters:
roots
- the ID:s of the root modelsonlyOwning
- If true, breakdowns are only followed for symbol that is marked as "owned" by models.
-
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 models that does not have one of the given types.- Parameters:
type
- The types to include
-
withCurrentRevisions
MTModelQuery withCurrentRevisions() -
withLockedRevisions
Retains only locked revisions of models. If the current revision in the workspace is locked the previous (locked) revision of the model is selected instead.- Parameters:
includeInitialRevisions
- If true the initial revisions (rev 0) will still be included in the result even they are not locked.
-
withPattern
MTModelQuery 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.
-
withChangesSince
Excludes models that have not been modified since a given date.- Specified by:
withChangesSince
in interfaceMTDateFilterQuery
- Parameters:
date
- The date to compare against.
-
withApprovers
Retains only models with at least one of the given users set as approver of the model.- Parameters:
includeNoApprovers
- If true then models with no approvers will be included in the result.approvers
- The accepted approvers.
-
withReviewers
Retains only models with at least one of the given users set as reviewer of the model.- Parameters:
includeNoReviewer
- If true then models with no reviewers will be included in the result.reviewers
- The accepted reviewers.
-
withMaintainers
Retains only models with at least one of the given users set as maintainer of the model.- Parameters:
includeNoMaintainers
- If true then models with no maintainers will be included in the result.maintainers
- The accepted maintainers.
-
withSubscribers
Retains only models with at least one of the given subscribers set as subscriber of the model.- Parameters:
includeNoSubscriber
- If true then models with no subscribers will be included in the result.subscribers
- The accepted subscribers.
-
withOwners
Retains only models with at least one of the given users set as owner of the model.- Parameters:
owners
- The accepted owners.
-
withGroups
Retains only models with at least one of the given groups set as group of the model.- Parameters:
groups
- The accepted groups.
-
withCreators
Retains only models with at least one of the given users set as creator of the model.- Parameters:
creators
- The accepted creators.
-
withLastModifiedBy
Retains only models that was last modified by one of the given users- Parameters:
modifiers
- The accepted modifiers.
-
withWorkflowStates
Retains only models with the given workflow states.- Parameters:
states
- The accepted workflow states.
-
withAttributeValues
Retains only models with selected attribute values.- Parameters:
filter
- The filter used.
-
withDocuments
Retains only models with at least one of the given documents connected to it.- Parameters:
documents
- The documents
-
sort
MTModelQuery sort(MTQuery.SortColumn sortColumn, boolean ascending, MTLanguage language, Locale locale) Sorts the selected models.- 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
-