Package com.ptc.core.query.common
Class BasicCriteriaSpec
java.lang.Object
com.ptc.core.query.common.BasicCriteriaSpec
- All Implemented Interfaces:
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
Supported API: true
Extendable: true
- See Also:
-
Field Summary
Fields inherited from interface com.ptc.core.query.common.CriterionSpec
LOGGER_NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidaugmentCriteria(CriteriaAugmentor a_augmentor, ResultSpec a_resultSpec) This method augments all criteria.static AttributeContainerSetbuildAugmentedCriteria(AttributeContainerSet a_existingCriteria, CriteriaAugmentor a_augmentor, ResultSpec a_resultSpec) This method builds augmented criteria.This method creates a copy of this instance that contains only non root criteria.booleanThis method returns true if any criteria exist.booleanThis method returns true if any of the associated criteria contains outer join criterion.getCriteria(TypeIdentifier a_targetTypeId) This method returns the criteria associated with a specified TypeIdentifier.getTypes()This method returns the set of TypeIdentifier that have specified criteria.booleanThis method indicates if a soft type should use the base hard type when returning the associated criteria.iterator()This method iterates over all criteria.voidputCriteria(TypeIdentifier a_targetTypeId, AttributeContainerSet a_criteria) This method maps the criteria associated with a specified TypeIdentifier.voidsetUseHardTypeForSoftType(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.
-
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
This method returns the set of TypeIdentifier that have specified criteria.
Supported API: true- Specified by:
getTypesin interfaceCriterionSpec- 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 TypeIdentifiera_criteria- specifies the associated criteria- Throws:
WTException
-
getCriteria
This method returns the criteria associated with a specified TypeIdentifier.
Supported API: true- Specified by:
getCriteriain interfaceCriterionSpec- Parameters:
a_targetTypeId- specifies the target TypeIdentifier- Returns:
- AttributeContainerSet
- Throws:
WTException
-
containsCriteria
This method returns true if any criteria exist.
Supported API: true- Specified by:
containsCriteriain interfaceCriterionSpec- Returns:
- true if any criteria exists
- Throws:
WTException
-
containsOuterJoin
This method returns true if any of the associated criteria contains outer join criterion.
Supported API: true- Specified by:
containsOuterJoinin interfaceCriterionSpec- Returns:
- true if any of the associated criteria contains outer join criterion
- Throws:
WTException
-
cloneNonRoot
This method creates a copy of this instance that contains only non root criteria.
Supported API: true- Specified by:
cloneNonRootin interfaceCriterionSpec- Returns:
- copy of this instance that contains only non root criteria
- Throws:
WTException
-
iterator
This method iterates over all criteria.
Supported API: true- Specified by:
iteratorin interfaceCriterionSpec- 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:
augmentCriteriain interfaceCriterionSpec- Parameters:
a_augmentor- specifies the augmentor to usea_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 augmenta_augmentor- specifies the augmentor to usea_resultSpec- specifies the result to use- Throws:
WTException
-