com.ptc.core.query.common
Class CriteriaHelper

java.lang.Object
  extended by 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 Summary
static com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier, boolean a_negated)
          Creates an AttributeContainerSet for existence of the specified AttributeType.
static com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier, wt.util.range.BoundaryPoint a_lowerValue, wt.util.range.BoundaryPoint a_upperValue)
          Creates an AttributeContainerSet for inclusion of the specified AttributeType in the range.
static com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier, Comparable a_lowerValue, Comparable a_upperValue)
          Creates an AttributeContainerSet for inclusion of the specified AttributeType in the range.
static com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier, com.ptc.core.meta.common.DataSet a_dataSet)
          Creates an AttributeContainerSet for comparison of the specified AttributeType and the data set.
static com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier, int a_wildcardMode, String a_value, boolean a_negated)
          Creates an AttributeContainerSet for wildcard comparison of the specified AttributeType, wildcard comparison mode and value.
static com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier, Object[] a_value, boolean a_negated)
          Creates an AttributeContainerSet for inclusion of the specified AttributeType in the list of values.
static com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier, Object a_value, boolean a_negated)
          Creates an AttributeContainerSet for equality of the specified AttributeType and value.
static com.ptc.core.meta.container.common.AttributeContainerSet newGreaterThanCriteria(Identifier a_identifier, Comparable a_value, boolean a_isInclusive)
          Creates an AttributeContainerSet for the specified AttributeType greater than the value.
static com.ptc.core.meta.container.common.AttributeContainerSet newLessThanCriteria(Identifier a_identifier, Comparable a_value, boolean a_isInclusive)
          Creates an AttributeContainerSet for the specified AttributeType less than the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newCriteria

public static com.ptc.core.meta.container.common.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:
WildcardSet

newCriteria

public static com.ptc.core.meta.container.common.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 com.ptc.core.meta.container.common.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 com.ptc.core.meta.container.common.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 com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier,
                                                                                   wt.util.range.BoundaryPoint a_lowerValue,
                                                                                   wt.util.range.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 com.ptc.core.meta.container.common.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 com.ptc.core.meta.container.common.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 com.ptc.core.meta.container.common.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 com.ptc.core.meta.container.common.AttributeContainerSet newCriteria(Identifier a_identifier,
                                                                                   com.ptc.core.meta.common.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