|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.starbase.starteam.QueryPart
A QueryPart object represents a boolean expression on the value of a particular property of an item. For example, it could be used to define query to match file objects whose name starts with a specific string.
| Field Summary | |
static int |
REL_ENDTEXT
Tests if a string valued property ends with the specified string. |
static int |
REL_EQUAL
The "equal-to" relation. |
static int |
REL_GREATEROREQUAL
The "greater-than-or-equal-to" relation. |
static int |
REL_GREATERTHAN
The "greater-than" relation. |
static int |
REL_LASTDAYS
True if the date falls within the last specified number of days. |
static int |
REL_LASTWEEKS
True if the date falls within the last specified number of week. |
static int |
REL_LESSOREQUAL
The "less-than-or-equal-to" relation. |
static int |
REL_LESSTHAN
The "less-than" relation. |
static int |
REL_NOTEQUAL
The "not-equal" relation. |
static int |
REL_OLDERDAYS
True if the date is older than the specified number of days. |
static int |
REL_OLDERWEEKS
True if the date is older than the specified number of weeks. |
static int |
REL_STARTTEXT
Tests if a string valued property starts with the specified string. |
static int |
REL_TEXTSEARCH
Tests if a string valued property contains the specified string. |
| Constructor Summary | |
QueryPart(int propertyID,
int relation,
byte[] value)
Creates a new QueryPart for the specified property. |
|
QueryPart(int propertyID,
int relation,
double value)
Creates a new QueryPart for the specified property. |
|
QueryPart(int propertyID,
int relation,
double value,
boolean ignoreTime)
Creates a new QueryPart for the specified property. |
|
QueryPart(int propertyID,
int relation,
int value)
Creates a new QueryPart for the specified property. |
|
QueryPart(int propertyID,
int relation,
int[] value)
Creates a new QueryPart for the specified property. |
|
QueryPart(int propertyID,
int relation,
OLEDate value,
boolean ignoreTime)
Creates a new QueryPart for the specified property. |
|
QueryPart(int propertyID,
int relation,
java.lang.String value,
boolean caseSensitive)
Creates a new QueryPart for the specified property. |
|
| Method Summary | |
QueryPart |
copyQueryPart()
Returns a copy of this QueryPart. |
boolean |
equals(java.lang.Object source)
returns true if this object instance is equal to the source |
boolean |
evaluate(Item item)
Evaluate this QueryPart with respect to the specified item. |
boolean |
evaluateAgainst(java.lang.Object value)
Evaluate this QueryPart with respect to the specified value. |
int |
getPropertyID()
|
int |
getRelation()
|
java.lang.Object |
getValue()
|
int |
hashCode()
returns a unique hash for all instances of this type |
boolean |
isIgnoreCase()
|
boolean |
isIgnoreTime()
|
void |
setIgnoreCase(boolean ignore)
|
void |
setIgnoreTime(boolean ignore)
|
void |
setPropertyID(int propertyID)
|
void |
setRelation(int relation)
|
java.lang.String |
toDebugString()
Returns a debug string representation of this QueryPart. |
java.lang.String |
toString()
Returns the debug string representation of this QueryPart. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int REL_LESSTHAN
public static final int REL_LESSOREQUAL
public static final int REL_EQUAL
public static final int REL_GREATEROREQUAL
public static final int REL_GREATERTHAN
public static final int REL_NOTEQUAL
public static final int REL_LASTDAYS
public static final int REL_LASTWEEKS
public static final int REL_OLDERDAYS
public static final int REL_OLDERWEEKS
public static final int REL_TEXTSEARCH
public static final int REL_STARTTEXT
public static final int REL_ENDTEXT
| Constructor Detail |
public QueryPart(int propertyID,
int relation,
int value)
propertyID - the property to testrelation - the relation operator defining the comparison testvalue - the integer value to compare against
public QueryPart(int propertyID,
int relation,
double value)
propertyID - the property to testrelation - the relation operator defining the comparison testvalue - the floating point value to compare against
public QueryPart(int propertyID,
int relation,
double value,
boolean ignoreTime)
propertyID - the property to testrelation - the relation operator defining the comparison testvalue - the floating point value to compare againstignoreTime - true if the comparsion should ignore the time of day (and just use the date)QueryPart.REL_OLDERDAYS,
QueryPart.REL_OLDERWEEKS,
QueryPart.REL_LASTDAYS,
QueryPart.REL_LASTWEEKS
public QueryPart(int propertyID,
int relation,
OLEDate value,
boolean ignoreTime)
propertyID - the property to testrelation - the relation operator defining the comparison testvalue - the date value to compare againstignoreTime - true if the comparsion should ignore the time of day (and just use the date)
public QueryPart(int propertyID,
int relation,
java.lang.String value,
boolean caseSensitive)
propertyID - the property to testrelation - the relation operator defining the comparison testvalue - the string value to compare againstcaseSensitive - true if the comparison should be case-sensitive
public QueryPart(int propertyID,
int relation,
byte[] value)
propertyID - the property to testrelation - the relation operator defining the comparison testvalue - the byte array value to compare against
public QueryPart(int propertyID,
int relation,
int[] value)
propertyID - the property to testrelation - the relation operator defining the comparison testvalue - the integer array value to compare against| Method Detail |
public QueryPart copyQueryPart()
public java.lang.String toString()
toString in class java.lang.ObjectQueryPart.toDebugString()public java.lang.String toDebugString()
public boolean evaluate(Item item)
item - the item whose specified property value to test against
public boolean evaluateAgainst(java.lang.Object value)
value - the value to test against
public int getRelation()
public void setRelation(int relation)
public boolean isIgnoreCase()
public void setIgnoreCase(boolean ignore)
public boolean isIgnoreTime()
public void setIgnoreTime(boolean ignore)
public int getPropertyID()
public void setPropertyID(int propertyID)
public java.lang.Object getValue()
public boolean equals(java.lang.Object source)
equals in class java.lang.Objectsource - Object the source to comapre with
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||