Interface MTQuery
- All Known Subinterfaces:
MTAttributeTypeQuery
,MTColorSchemeQuery
,MTDocumentQuery
,MTDocumentSourceQuery
,MTDocumentTypeQuery
,MTEntityPropertyQuery
,MTImageQuery
,MTLayerTypeQuery
,MTListQuery
,MTModelQuery
,MTPluginDataQuery
,MTSubscriberQuery
,MTSymbolQuery
,MTTimestampQuery
,MTUserQuery
,MTVariableQuery
,MutablePublishProfileQuery
public interface MTQuery
Can be used to build a query object for retrieving a set of
data from storage. When
execute
is called, all
data will be fetched from storage and accessible through
a MTQueryResult
object. Queries can be chained
so that the result contains different result types, e.g.
models and symbols. You cannot however chain the same type,
i.e. calling models() will reset the state of the model
result type, overwriting any previous changes made through
the models() API.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Queries can be executed to store a context for the results, such as which models an object are used in.static enum
The column on which to sort when performing a sort operation.static interface
Represents the state of a query which may be used by a query builder. -
Method Summary
Modifier and TypeMethodDescriptionclear()
Clears any selected data and returns an "empty" query.execute()
Executes the query and returns a result which may be used to retrieve iterators for each entity type in the result.Returns the result types (e.g.getState()
Returns the current state of the query, which can be used for example for a query builder.images()
lists()
models()
void
Serialises this query to XML.symbols()
users()
-
Method Details
-
symbols
MTSymbolQuery symbols() -
models
MTModelQuery models() -
documents
MTDocumentQuery documents() -
documentSources
MTDocumentSourceQuery documentSources() -
colorSchemes
MTColorSchemeQuery colorSchemes() -
attributeTypes
MTAttributeTypeQuery attributeTypes() -
documentTypes
MTDocumentTypeQuery documentTypes() -
layerTypes
MTLayerTypeQuery layerTypes() -
lists
MTListQuery lists() -
variables
MTVariableQuery variables() -
images
MTImageQuery images() -
timestamps
MTTimestampQuery timestamps() -
publishProfiles
MutablePublishProfileQuery publishProfiles() -
pluginData
MTPluginDataQuery pluginData() -
workspacePluginData
MTPluginDataQuery workspacePluginData() -
users
MTUserQuery users() -
subscribers
MTSubscriberQuery subscribers() -
entityProperties
MTEntityPropertyQuery entityProperties() -
clear
MTQuery clear()Clears any selected data and returns an "empty" query. -
execute
Executes the query and returns a result which may be used to retrieve iterators for each entity type in the result.- Throws:
MTAccessException
-
serialize
Serialises this query to XML.- Parameters:
queryElement
- The element to serialise the query to. All child nodes of the element will be removed and the query information will be appended to it. The query can be recreated by passing the same element to MTWorkspaceHeader.createQuery(Element).
-
getState
MTQuery.State getState()Returns the current state of the query, which can be used for example for a query builder. -
getResultTypes
Collection<Class> getResultTypes()Returns the result types (e.g. MTModel.class, MTSymbol.class) that this query will try to select. Note that this does not guarantee that there will be actual results when executing the query, only that the query has settings that will actually try to select something. Note that this may return an empty list if the query does not find what it expects, such as all objects in a model that does not exist.
-