com.ptc.core.query.command.common
Class BasicQueryCommand

java.lang.Object
  extended by com.ptc.core.command.common.bean.AbstractCommand
      extended by com.ptc.core.command.common.bean.AbstractServerCommand
          extended by com.ptc.core.command.common.bean.repository.AbstractRepositoryCommand
              extended by com.ptc.core.query.command.common.AbstractQueryCommand
                  extended by com.ptc.core.query.command.common.BasicQueryCommand
All Implemented Interfaces:
PageRequest, RepositoryCommand, com.ptc.core.command.common.Command, com.ptc.core.command.common.ServerCommand, Externalizable, Serializable
Direct Known Subclasses:
AttributeContainerQueryCommand

public class BasicQueryCommand
extends AbstractQueryCommand
implements Externalizable

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.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ptc.core.command.common.bean.repository.RepositoryCommand
PAGE_MODE, RESULT_CONTAINER, RESULT_SESSION, SORT
 
Fields inherited from interface com.ptc.core.command.common.bean.repository.PageRequest
COUNT, OFFSET
 
Method Summary
 void appendCriteria(com.ptc.core.meta.container.common.AttributeContainerSet a_criteria, boolean a_union)
          Appends the specified criteria to the existing criteria.
 com.ptc.core.meta.container.common.AttributeContainerSet getCriteria()
          Gets the value of the attribute: criteria; Specifies the criteria that "filters" TypeInstances returned in the query.
 ResultSpec getResult()
          Gets the value of the attribute: result; Specificies the list of AttributeTypeIdentifiers that are to be included in the results.
 com.ptc.core.meta.common.SortSpec getSort()
          Gets the value of the attribute: sort; Specifies the TypeInstance sort order.
 void setCriteria(com.ptc.core.meta.container.common.AttributeContainerSet a_Criteria)
          Sets the value of the attribute: criteria; Specifies the criteria that "filters" TypeInstances returned in the query.
 void setResult(ResultSpec a_Result)
          Sets the value of the attribute: result; Specificies the list of AttributeTypeIdentifiers that are to be included in the results.
 void setSort(com.ptc.core.meta.common.SortSpec a_Sort)
          Sets the value of the attribute: sort; Specifies the TypeInstance sort order.
 
Methods inherited from class com.ptc.core.query.command.common.AbstractQueryCommand
getCriteriaAugmentor, getPageMode, setCriteriaAugmentor, setPageMode
 
Methods inherited from class com.ptc.core.command.common.bean.repository.AbstractRepositoryCommand
getCount, getOffset, getResultContainer, getResultList, getResultSession, setCount, setOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSort

public com.ptc.core.meta.common.SortSpec getSort()
                                          throws WTException
Gets the value of the attribute: sort; Specifies the TypeInstance sort order.

Supported API: true

Specified by:
getSort in interface RepositoryCommand
Returns:
SortSpec
Throws:
WTException

setSort

public void setSort(com.ptc.core.meta.common.SortSpec a_Sort)
             throws WTPropertyVetoException
Sets the value of the attribute: sort; Specifies the TypeInstance sort order.

Supported API: true

Specified by:
setSort in interface RepositoryCommand
Overrides:
setSort in class AbstractRepositoryCommand
Parameters:
a_Sort -
Throws:
WTPropertyVetoException

getCriteria

public com.ptc.core.meta.container.common.AttributeContainerSet getCriteria()
                                                                     throws WTException
Gets the value of the attribute: criteria; Specifies the criteria that "filters" TypeInstances returned in the query.

Supported API: true

Returns:
AttributeContainerSet
Throws:
WTException

setCriteria

public void setCriteria(com.ptc.core.meta.container.common.AttributeContainerSet a_Criteria)
                 throws WTPropertyVetoException
Sets the value of the attribute: criteria; Specifies the criteria that "filters" TypeInstances returned in the query.

Supported API: true

Parameters:
a_Criteria -
Throws:
WTPropertyVetoException

getResult

public ResultSpec getResult()
                     throws WTException
Gets the value of the attribute: result; Specificies the list of AttributeTypeIdentifiers that are to be included in the results.

Supported API: true

Returns:
ResultSpec
Throws:
WTException

setResult

public void setResult(ResultSpec a_Result)
               throws WTPropertyVetoException
Sets the value of the attribute: result; Specificies the list of AttributeTypeIdentifiers that are to be included in the results.

Supported API: true

Parameters:
a_Result -
Throws:
WTPropertyVetoException

appendCriteria

public void appendCriteria(com.ptc.core.meta.container.common.AttributeContainerSet a_criteria,
                           boolean a_union)
                    throws WTException
Appends the specified criteria to the existing criteria.

Supported API: true

Parameters:
a_criteria - criteria instance to append
a_union - Indicates if the criteria should be a union (i.e. logical OR) or and intersection (i.e. logical AND).
Throws:
WTException