|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
See:
Description
| Class Summary | |
|---|---|
| AbstractQueryCommand | This abstract class defines a command for all queries that use com.ptc.core.query services. |
| AttributeContainerQueryCommand | This class provies a query implementation based on the contents of an AttributeContainer. |
| BasicQueryCommand | This class provies a basic implementation of a query comand the results, criteria, and sort specifications are implemented as simple attributes with setters and getters. |
| FindPersistentEntityCommand | This Command executes a query derived from the values int the source TypeInstance. |
Describes the commands for queries of Windchill persistent data.
Command Hierarchy
Query commands are based on the general Command subsystem architecture. Query specific commands are derived directly from commands in the Repository package.
AbstractQueryCommand
The AbstractQueryCommand specifies a query
in terms of derived result, criteria, and sort specifications. The concrete subclasses implement
these derived attributes.
BasicQueryCommand
BasicQueryCommand is a simple container that contains
attributes for the result, criteria, and sort specifications. These attributes can be accessed
via normal getter and setter methods. The criteria and sort specifications are not required.
If the result specification is not explicitly set, then one will be derived from the filter
attribute (inherited from AbstractServerCommand). The
helper method BasicQueryCommand.appendCriteria(com.ptc.core.meta.container.common.AttributeContainerSet, boolean) can
be used to add additional critieria to any existing ones.
AttributeContainerQueryCommand
AttributeContainerQueryCommand derives the specifications
from the AttributeTypeIdentifiers and content of the input
AttributeContainer (inherited from
AbstractServerCommand). The content will generally contain
either DataSet or value objects. The overall criteria are built from the AttributeContainer by
constructing a CompositeAttributeContainerSet with an
implicit intersection (logical AND) of criteria for each content object. The ResultSpec is simply
the entire list of AttributeTypeIdentifiers in the AttributeContainer.
The AttributeContainerQueryCommand extends BasicQueryCommand so that additional query specifications can be added. A sort specification can be set and additional criteria can be added. If other criteria have been explicitly added, then the criteria derived from the AttributeContainer are combined via intersection (logical OR) when executing the query.
Criteria Augmentation
The query commands support an attribute for augmenting the criteria specified in the command.
The attribute CriteriaAugmentor is used to specify an
implementation that applies to every execution of the command. When the command is executed, the
existing criteria are augmented with criteria generated by the CriteriaAugmentor implementation.
The criterion are combined using intersection (i.e. logical AND).
The default CriteriaAugmentor implementation for all query commands is
LatestCriteriaAugmentor. To override this default behavior,
the NoOpCriteriaAugmentor or other applicable implementation
could be set on the query command prior to execution.
Outputs
The query commands have two outputs, ResultContainer
and RepositoryPagingSession. The
ResultContainer holds a List of TypeInstances and is ordered as indicated by the SortSpec. The optional
RepositoryPagingSession will be valid if a paging session was established as specified by the input
PageMode. A valid RepositoryPagingSession can be
used to fetch more results or to close the paging session. Queries can always involve paging, either
implicitly or explicitly. Therefore, the result RepositoryPagingSession should always be processed to
determine if all results have been obtained. See Paging Patterns
for more details.
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||