Project: stp

com.ibm.rational.wvcm.stp.cq
Enum CqQuery.FilterLeaf.TargetType

Object
  extended by Enum<CqQuery.FilterLeaf.TargetType>
      extended by CqQuery.FilterLeaf.TargetType
All Implemented Interfaces:
com.ibm.rational.wvcm.stpex.StpExEnumeration, Serializable, Comparable<CqQuery.FilterLeaf.TargetType>
Enclosing interface:
CqQuery.FilterLeaf

public static enum CqQuery.FilterLeaf.TargetType
extends Enum<CqQuery.FilterLeaf.TargetType>
implements com.ibm.rational.wvcm.stpex.StpExEnumeration

A code indicating how the target of the comparison is being specified.

A TargetType is paired with each target value in a FilterLeaf.

For a dynamic filter, the target type is PROMPTED. The target value is the prompt that can be shown to a user to indicate to that user what value that user should provide. Prior to executing the query, the prompt should be replaced by the user-provided value and the target type adjusted appropriately.

If the target type is USER, YESTERDAY, TODAY, or TOMMORROW, the target value should be null since the target value is implicit in the target type code.

In ClearQuest, filter targets are always expressed as strings. In this API targets may be specified by any Java Object. If the target Object is not a Date, Object.toString() will be applied to it to obtain the string to pass to ClearQuest. If the target value is null, the empty string ("") is used.

If the target value is a Date, the Date will be converted to a String formated as expected by ClearQuest, using the value of StpProvider.getUserTimeZone(). The target type with which the Date value is paired determines the format used.

If the target value is specified by a String it is not usually modified by the client. But, the value may be reformated by the client if the client knows that the source field or target value is supposed to be a date/time specification or if the UNKNOWN target type is used.


Enum Constant Summary
CONSTANT
          Target is a constant value.
DATE_ONLY
          Target is the specification for a date-only target.
DATE_TIME
          Target is the specification for a date and time target.
PROMPTED
          Target is a user-supplied value
TODAY
          Target is today's date
TOMORROW
          Target is tomorrow's date
UNKNOWN
          Unspecified target type; the null TargetTyoe value.
USER
          Target is the current user
YESTERDAY
          Target is yesterday's date
 
Method Summary
static CqQuery.FilterLeaf.TargetType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CqQuery.FilterLeaf.TargetType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CONSTANT

public static final CqQuery.FilterLeaf.TargetType CONSTANT
Target is a constant value. If the field is of type DATE_TIME, the target type will be converted to DATE_TIME unless the target value is specified as a String and that string contains no time component, in which case the target type will be converted to DATE_ONLY.


DATE_ONLY

public static final CqQuery.FilterLeaf.TargetType DATE_ONLY
Target is the specification for a date-only target. The field value is to be compared against the 24 hour interval for the specified date. If a Date object is used to specify the target value, only the date portion of that object will be used in the filter, where the date is determined using the current client time zone defined in the provider. If a String is used to specify the target value and that specification has a time component, the string will be parsed to a Date using the client time zone and then formatted as a date-only string as just described.


DATE_TIME

public static final CqQuery.FilterLeaf.TargetType DATE_TIME
Target is the specification for a date and time target. The field value is to be compared against the precise time denoted by the target value. If a Date object is used to specify the target value its value will be used in the filter. If a String is used to specify the target value and the String contains no time component, the value will be converted to midnight on the date specified in the client time zone.


PROMPTED

public static final CqQuery.FilterLeaf.TargetType PROMPTED
Target is a user-supplied value


TODAY

public static final CqQuery.FilterLeaf.TargetType TODAY
Target is today's date


TOMORROW

public static final CqQuery.FilterLeaf.TargetType TOMORROW
Target is tomorrow's date


UNKNOWN

public static final CqQuery.FilterLeaf.TargetType UNKNOWN
Unspecified target type; the null TargetTyoe value. If used in a setTarget call, heuristics will be applied to the associated target value in an attempt to recognize it as a time specification and reformat it to the format expected by ClearQuest if needed.


USER

public static final CqQuery.FilterLeaf.TargetType USER
Target is the current user


YESTERDAY

public static final CqQuery.FilterLeaf.TargetType YESTERDAY
Target is yesterday's date

Method Detail

valueOf

public static CqQuery.FilterLeaf.TargetType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

values

public static final CqQuery.FilterLeaf.TargetType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(CqQuery.FilterLeaf.TargetType c : CqQuery.FilterLeaf.TargetType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

Generated Wed 17-Oct-2012 09:36 PM

Copyright © IBM 2012. All rights reserved.