|
WPI GDC CMS 0.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.wpi.gdc.cms.db.Restriction
|
+--org.wpi.gdc.cms.db.StringRestriction
This restriction describes how a string should appear.
There are two basic modes: LIKE and EXACT. In LIKE mode, the string checked is a string glob. In EXACT, the string must exactly equal the string in this class.
For example ... FIXME: Finish this :)
| Field Summary | |
static int |
COMPARE_EXACT
The EXACT mode |
static int |
COMPARE_LIKE
The LIKE mode. |
protected int |
compare_mode
The comparison mode, either COMPARE_LIKE or COMPARE_EXACT. |
protected java.lang.String |
string
The example string. |
| Fields inherited from class org.wpi.gdc.cms.db.Restriction |
bool, bool_not, BOOLEAN_AND, BOOLEAN_OR, field, next |
| Constructor Summary | |
StringRestriction(java.lang.String string,
int mode)
Creates a new StringRestriction. |
|
| Method Summary | |
int |
getCompareMode()
Retrieves the string being checked. |
java.lang.String |
getString()
Retrieves the string being checked. |
void |
setCompareMode(int mode)
Sets the compare mode. |
void |
setString(java.lang.String string)
Sets the string. |
boolean |
validate(java.lang.Object o)
Validate this restriction against a sample object. |
| Methods inherited from class org.wpi.gdc.cms.db.Restriction |
getBoolean, getField, getNot, setBoolean, setField, setNot |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int COMPARE_LIKE
public static final int COMPARE_EXACT
protected java.lang.String string
protected int compare_mode
COMPARE_LIKE or COMPARE_EXACT.| Constructor Detail |
public StringRestriction(java.lang.String string,
int mode)
string - The string to compare against.mode - The compare mode.java.lang.IllegalArgumentException - If the mode is not COMPARE_LIKE
or COMPARE_EXACT.NullPointerException - if the string is null.| Method Detail |
public java.lang.String getString()
string,
setString(String)public void setString(java.lang.String string)
string - The new string value.NullPointerException - if string is null.string,
getString()public int getCompareMode()
COMPARE_LIKE or COMPARE_EXACT.compare_mode,
setCompareMode(int)public void setCompareMode(int mode)
mode - The new compare mode, either COMPARE_LIKE or COMPARE_EXACT.java.lang.IllegalArgumentException - If the new mode is not COMPARE_LIKE
or COMPARE_EXACT.compare_mode,
getCompareMode()public boolean validate(java.lang.Object o)
validate in class Restriction
|
WPI GDC CMS 0.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||