|
Project: stp | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
ObjectEnum<CqQuery.FilterLeaf.TargetType>
CqQuery.FilterLeaf.TargetType
public static enum CqQuery.FilterLeaf.TargetType
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 are 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 |
---|
public static final CqQuery.FilterLeaf.TargetType CONSTANT
public static final CqQuery.FilterLeaf.TargetType DATE_ONLY
public static final CqQuery.FilterLeaf.TargetType DATE_TIME
public static final CqQuery.FilterLeaf.TargetType PROMPTED
public static final CqQuery.FilterLeaf.TargetType TODAY
public static final CqQuery.FilterLeaf.TargetType TOMORROW
public static final CqQuery.FilterLeaf.TargetType UNKNOWN
public static final CqQuery.FilterLeaf.TargetType USER
public static final CqQuery.FilterLeaf.TargetType YESTERDAY
Method Detail |
---|
public static CqQuery.FilterLeaf.TargetType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static CqQuery.FilterLeaf.TargetType[] values()
for (CqQuery.FilterLeaf.TargetType c : CqQuery.FilterLeaf.TargetType.values()) System.out.println(c);
|
Generated Tue 25-Jul-2017 08:41 PM | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |