Class BasicCriteriaSpec

java.lang.Object
com.ptc.core.query.common.BasicCriteriaSpec
All Implemented Interfaces:
CriterionSpec, Serializable

public class BasicCriteriaSpec extends Object implements CriterionSpec, Serializable
This class provides a basic mapped implementation for specifying the criteria for a type based query. A map of TypeIdentifiers and associated AttributeContainerSet instances is maintained and used to return a criteria.

Supported API: true

Extendable: true
See Also:
  • Method Details

    • isUseHardTypeForSoftType

      public boolean isUseHardTypeForSoftType()
      This method indicates if a soft type should use the base hard type when returning the associated criteria. The hard type is only used if there is not exact soft type mapping.

      Supported API: true
      Returns:
      true if soft type should use the base hard type when returning the associated criteria
    • setUseHardTypeForSoftType

      public void setUseHardTypeForSoftType(boolean a_useHardTypeForSoftType)
      This method sets a flag to indicate if a soft type should use the base hard type when returning the associated criteria. The hard type is only used if there is not exact soft type mapping.

      Supported API: true
      Parameters:
      a_useHardTypeForSoftType - boolean flag indicating if soft type should use the base hard type when returning the associated criteria
    • getTypes

      public Set<TypeIdentifier> getTypes() throws WTException
      This method returns the set of TypeIdentifier that have specified criteria.

      Supported API: true
      Specified by:
      getTypes in interface CriterionSpec
      Returns:
      Set of TypeIdentifiers
      Throws:
      WTException
    • putCriteria

      public void putCriteria(TypeIdentifier a_targetTypeId, AttributeContainerSet a_criteria) throws WTException
      This method maps the criteria associated with a specified TypeIdentifier.

      Supported API: true
      Parameters:
      a_targetTypeId - specifies the target TypeIdentifier
      a_criteria - specifies the associated criteria
      Throws:
      WTException
    • getCriteria

      public AttributeContainerSet getCriteria(TypeIdentifier a_targetTypeId) throws WTException
      This method returns the criteria associated with a specified TypeIdentifier.

      Supported API: true
      Specified by:
      getCriteria in interface CriterionSpec
      Parameters:
      a_targetTypeId - specifies the target TypeIdentifier
      Returns:
      AttributeContainerSet
      Throws:
      WTException
    • containsCriteria

      public boolean containsCriteria() throws WTException
      This method returns true if any criteria exist.

      Supported API: true
      Specified by:
      containsCriteria in interface CriterionSpec
      Returns:
      true if any criteria exists
      Throws:
      WTException
    • containsOuterJoin

      public boolean containsOuterJoin() throws WTException
      This method returns true if any of the associated criteria contains outer join criterion.

      Supported API: true
      Specified by:
      containsOuterJoin in interface CriterionSpec
      Returns:
      true if any of the associated criteria contains outer join criterion
      Throws:
      WTException
    • cloneNonRoot

      public CriterionSpec cloneNonRoot() throws WTException
      This method creates a copy of this instance that contains only non root criteria.

      Supported API: true
      Specified by:
      cloneNonRoot in interface CriterionSpec
      Returns:
      copy of this instance that contains only non root criteria
      Throws:
      WTException
    • iterator

      public Iterator<AttributeContainerSet> iterator() throws WTException
      This method iterates over all criteria.

      Supported API: true
      Specified by:
      iterator in interface CriterionSpec
      Returns:
      iterator over all criteria
      Throws:
      WTException
    • augmentCriteria

      public void augmentCriteria(CriteriaAugmentor a_augmentor, ResultSpec a_resultSpec) throws WTException
      This method augments all criteria.

      Supported API: true
      Specified by:
      augmentCriteria in interface CriterionSpec
      Parameters:
      a_augmentor - specifies the augmentor to use
      a_resultSpec - specifies the result to use
      Throws:
      WTException
    • buildAugmentedCriteria

      public static AttributeContainerSet buildAugmentedCriteria(AttributeContainerSet a_existingCriteria, CriteriaAugmentor a_augmentor, ResultSpec a_resultSpec) throws WTException
      This method builds augmented criteria.

      Supported API: true
      Parameters:
      a_existingCriteria - specifies the existing criteria to augment
      a_augmentor - specifies the augmentor to use
      a_resultSpec - specifies the result to use
      Throws:
      WTException