Class CriteriaHelper

java.lang.Object
com.ptc.core.query.common.CriteriaHelper

public class CriteriaHelper extends Object
This helper class provides static methods for constructing criteria objects that can be used for queries.

Supported API: true

Extendable: false
  • Method Details

    • newCriteria

      public static AttributeContainerSet newCriteria(Identifier a_identifier, int a_wildcardMode, String a_value, boolean a_negated) throws WTException
      Creates an AttributeContainerSet for wildcard comparison of the specified AttributeType, wildcard comparison mode and value. The wildcard modes include CONTAINS, STARTS_WITH, ENDS_WITH, and EQUALS. There are also case-insensitive versions of each of these modes.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_wildcardMode - Specifies the wildcard mode (e.g. starts with, contains, etc.)
      a_value - Specifies the value to use in the comparison
      a_negated - Specifies if the criteria should be negated.
      Returns:
      AttributeContainerSet
      Throws:
      WTException
      See Also:
    • newCriteria

      public static AttributeContainerSet newCriteria(Identifier a_identifier, Object[] a_value, boolean a_negated) throws WTException
      Creates an AttributeContainerSet for inclusion of the specified AttributeType in the list of values.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_value - List of values for the criteria.
      a_negated - Specifies if the criteria should be negated.
      Returns:
      AttributeContainerSet
      Throws:
      WTException
    • newCriteria

      public static AttributeContainerSet newCriteria(Identifier a_identifier, boolean a_negated) throws WTException
      Creates an AttributeContainerSet for existence of the specified AttributeType.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_negated - Specifies if the criteria should be negated.
      Returns:
      AttributeContainerSet
      Throws:
      WTException
    • newCriteria

      public static AttributeContainerSet newCriteria(Identifier a_identifier, Comparable a_lowerValue, Comparable a_upperValue) throws WTException
      Creates an AttributeContainerSet for inclusion of the specified AttributeType in the range.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_lowerValue - Specifies the value (inclusive) to use as the lower bound in the range
      a_upperValue - Specifies the value (inclusive) to use as the upper bound in the range
      Returns:
      AttributeContainerSet
      Throws:
      WTException
    • newCriteria

      public static AttributeContainerSet newCriteria(Identifier a_identifier, BoundaryPoint a_lowerValue, BoundaryPoint a_upperValue) throws WTException
      Creates an AttributeContainerSet for inclusion of the specified AttributeType in the range.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_lowerValue - Specifies the value (inclusive) to use as the lower bound in the range
      a_upperValue - Specifies the value (inclusive) to use as the upper bound in the range
      Returns:
      AttributeContainerSet
      Throws:
      WTException
    • newLessThanCriteria

      public static AttributeContainerSet newLessThanCriteria(Identifier a_identifier, Comparable a_value, boolean a_isInclusive) throws WTException
      Creates an AttributeContainerSet for the specified AttributeType less than the value.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_value - Specifies the value to use
      a_isInclusive - Indicates if the value is included in the comparison
      Returns:
      AttributeContainerSet
      Throws:
      WTException
    • newGreaterThanCriteria

      public static AttributeContainerSet newGreaterThanCriteria(Identifier a_identifier, Comparable a_value, boolean a_isInclusive) throws WTException
      Creates an AttributeContainerSet for the specified AttributeType greater than the value.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_value - Specifies the value to use
      a_isInclusive - Indicates if the value is included in the comparison
      Returns:
      AttributeContainerSet
      Throws:
      WTException
    • newCriteria

      public static AttributeContainerSet newCriteria(Identifier a_identifier, Object a_value, boolean a_negated) throws WTException
      Creates an AttributeContainerSet for equality of the specified AttributeType and value.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_value - Specifies the value to use in the comparison
      a_negated - Specifies if the criteria should be negated.
      Returns:
      AttributeContainerSet
      Throws:
      WTException
    • newCriteria

      public static AttributeContainerSet newCriteria(Identifier a_identifier, DataSet a_dataSet) throws WTException
      Creates an AttributeContainerSet for comparison of the specified AttributeType and the data set.

      Supported API: true
      Parameters:
      a_identifier - Specifies the Identifier in the comparison
      a_dataSet - Specifies the data set of the criteria
      Returns:
      AttributeContainerSet
      Throws:
      WTException