Project: stp

com.ibm.rational.wvcm.stp.cq
Interface CqQuery.FilterLeaf

All Superinterfaces:
CqQuery.Filter
Enclosing interface:
CqQuery

public static interface CqQuery.FilterLeaf
extends CqQuery.Filter

A field/value comparison within a query filter expression; the leaf of a query filter expression. This structure is also used for specifying a dynamic filter value.


Nested Class Summary
static class CqQuery.FilterLeaf.TargetType
          A code indicating how the target of the comparison is being specified.
 
Nested classes/interfaces inherited from interface CqQuery.Filter
CqQuery.Filter.Operation
 
Method Summary
 void addTarget(CqQuery.FilterLeaf.TargetType targetType, Object target)
          Add the type and value for an additional target of the comparison.
 CqFieldDefinition[] getSource()
          Returns the field path designating the source of the comparison.
 String getSourceName()
          Returns the character image of the field path designating the source of the comparison
 String getTarget()
          Returns the first target of the comparison.
 String getTarget(int index)
          Returns the n-th target value of the comparison.
 int getTargetCount()
          Returns the number of targets in this comparison expression Each comparison operation requires a different number of targets ranging from none (IS_NULL, IS_NOT_NULL) to many (IS_IN_SET, IS_NOT_IN_SET).
 List<String> getTargets()
          Returns a list of all the target values for the comparison.
 CqQuery.FilterLeaf.TargetType getTargetType()
          Returns the target type code for the first target.
 CqQuery.FilterLeaf.TargetType getTargetType(int index)
          Returns the target type code for the n-th target of the comparison.
 CqQuery.FilterLeaf.TargetType[] getTargetTypes()
          Returns an array of all the target types for the comparison corresponding to the vector of values returned by FilterLeaf.getTargets().
 void setTarget(CqQuery.FilterLeaf.TargetType targetType)
          Sets the first target of the comparison and resets the target count to 1.
 void setTarget(CqQuery.FilterLeaf.TargetType targettype, Object target)
          Sets the first target of the comparison and resets the target count to 1.
 void setTargets(CqQuery.FilterLeaf.TargetType[] targetTypes, List<Object> targets)
          Set the types and values of multiple targets for the comparison.
 void setTargets(Object... targets)
          Set the type and value for each targets for the comparison.
 
Methods inherited from interface CqQuery.Filter
getOperation, setOperation
 

Method Detail

addTarget

void addTarget(CqQuery.FilterLeaf.TargetType targetType,
               Object target)
Add the type and value for an additional target of the comparison.

Parameters:
targetType - The type of the additional target value. Cannot be null.
target - The additional target. The value provided will be converted to a String object appropriate to the TargetType specified. If null and a string value is required, the empty string ("") will be used.

getSource

CqFieldDefinition[] getSource()
Returns the field path designating the source of the comparison.

Returns:
A specification of the record field whose value will be compared against the target value(s) in this filter. The path consists of one or more record fields each represented by a CqFieldDefinition object. The first field in the path is a field of the query's primary record type. All fields in the path, except for the last field, must be reference-type fields, and in each case, the field that follows the reference field must be a field of the record type referenced by the preceding reference field. Will never be null.

getSourceName

String getSourceName()
Returns the character image of the field path designating the source of the comparison

Returns:
The returned image consists of the field names of the field path separated one from the other by a dot symbol. Will never be null.

getTarget

String getTarget()
Returns the first target of the comparison.

Returns:
getTarget(0).

getTarget

String getTarget(int index)
Returns the n-th target value of the comparison.

Parameters:
index - The 0-based index of the desired target. Must be less than the target count.
Returns:
The character image of the the n-th target. Will never be null.

getTargetCount

int getTargetCount()
Returns the number of targets in this comparison expression Each comparison operation requires a different number of targets ranging from none (IS_NULL, IS_NOT_NULL) to many (IS_IN_SET, IS_NOT_IN_SET).

Returns:
The number of comparison targets currently specified for this comparison.

getTargets

List<String> getTargets()
Returns a list of all the target values for the comparison. If the TargetType of the target is TODAY, TOMORROW, YESTERDAY, or USER, the value is null

Returns:
A list of String elements, each containing the character image of a target value. Will never be null.

getTargetType

CqQuery.FilterLeaf.TargetType getTargetType()
Returns the target type code for the first target.

Returns:
getTargetType(0)

getTargetType

CqQuery.FilterLeaf.TargetType getTargetType(int index)
Returns the target type code for the n-th target of the comparison.

Parameters:
index - The 0-based index of the desired target. Must be less than the target count.
Returns:
The target type code for the n-th target of the comparison.

getTargetTypes

CqQuery.FilterLeaf.TargetType[] getTargetTypes()
Returns an array of all the target types for the comparison corresponding to the vector of values returned by FilterLeaf.getTargets().

Returns:
A vector of TargetType codes corresponding in order to the values returned by FilterLeaf.getTargets().

setTarget

void setTarget(CqQuery.FilterLeaf.TargetType targetType)
Sets the first target of the comparison and resets the target count to 1.

Parameters:
targetType - A FilterLeaf.TargetType enumerator specifying the type of the first target. This TargetType must be TODAY, TOMORROW, YESTERDAY, or USER

setTarget

void setTarget(CqQuery.FilterLeaf.TargetType targettype,
               Object target)
Sets the first target of the comparison and resets the target count to 1.

Parameters:
targettype - The type of the first target value. Cannot be null.
target - The first target value. The value provided will be converted to a String object appropriate to the TargetType specified. If null and a string value is required, the empty string ("") will be used.

setTargets

void setTargets(CqQuery.FilterLeaf.TargetType[] targetTypes,
                List<Object> targets)
Set the types and values of multiple targets for the comparison.

Parameters:
targetTypes - An array of target type codes designating the way the corresponding values in the targets parameter are specified.
targets - An array of Object elements, each containing a target value for the comparison. Cannot be null. The values provided will be converted to a String objects appropriate to the TargetTypes specified. If null and a string value is required, the empty string ("") will be used.

setTargets

void setTargets(Object... targets)
Set the type and value for each targets for the comparison.

Parameters:
targets - An array of TargetType codes and other Object values designating the new targets of the comparison operation.

Nominally, this argument is an array of alternating TargetType and target value Objects specifying, respectively, the type and value of each filter target. However, for USER, YESTERDAY, TODAY, and TOMORROW target types, the associated null value may be elided. If a target value is not preceded by a target type, then the target type is assumed to be CONSTANT or UNKNOWN. Thus, although a TargetType may always be specified for each target value, a TargetType entry is is required only when specifying a PROMPTED, DATE_ONLY, or DATE_TIME target type.

Initially, an untyped value is assumed to be of type UNKNOWN, which means heuristics will be applied to the value to determine whether or not the value is a date/time value that needs to be converted to a form acceptable to ClearQuest. If, however, the CONSTANT type was used previously in the array, an untyped value is assumed to be of type CONSTANT, which means the value will be converted only if the field type is known to be DATE_TIME.

May be null or empty to specify no targets for the comparison operation.


Generated Fri 20-Feb-2015 11:07 PM

Copyright © IBM 2015. All rights reserved.