| java.lang.Object org.griphyn.vdl.annotation.Predicate
Predicate | public class Predicate (Code) | | This class defines basic predicates used for query annotations.
Currently included: AND, OR, NOT, EXISTS, LIKE, BETWEEN_AND,
CONTAINS, EQ, NE, GT, LT, GE, LE.
author: Jens-S. Vöckler author: Yong Zhao version: $Revision: 50 $ |
Field Summary | |
final public static int | AND | final public static int | BETWEEN | final public static int | CONTAINS | final public static int | EQ | final public static int | EXISTS | final public static int | GE | final public static int | GT | final public static int | LE | final public static int | LIKE | final public static int | LT | final public static int | NE | final public static int | NOT | final public static int | OR | final public static String[] | PREDICATE_STRING | final public static int | TYPE_BOOL | final public static int | TYPE_DATE | final public static int | TYPE_FLOAT | final public static int | TYPE_INT | final public static int | TYPE_STRING |
Constructor Summary | |
public | Predicate(int predicate) | public | Predicate(int predicate, String key) | public | Predicate(int predicate, String key, String value) Constructs the predicate and key. | public | Predicate(int predicate, String key, int type, String value) Constructs the predicate and key. | public | Predicate(int predicate, String key, int type, String value1, String value2) Constructs the predicate and key. |
AND | final public static int AND(Code) | | Defines constants for predicates
|
BETWEEN | final public static int BETWEEN(Code) | | |
CONTAINS | final public static int CONTAINS(Code) | | |
EQ | final public static int EQ(Code) | | |
EXISTS | final public static int EXISTS(Code) | | |
GE | final public static int GE(Code) | | |
GT | final public static int GT(Code) | | |
LE | final public static int LE(Code) | | |
LIKE | final public static int LIKE(Code) | | |
LT | final public static int LT(Code) | | |
NE | final public static int NE(Code) | | |
NOT | final public static int NOT(Code) | | |
OR | final public static int OR(Code) | | |
PREDICATE_STRING | final public static String[] PREDICATE_STRING(Code) | | Defines corresponding strings for predicates
|
TYPE_BOOL | final public static int TYPE_BOOL(Code) | | |
TYPE_DATE | final public static int TYPE_DATE(Code) | | |
TYPE_FLOAT | final public static int TYPE_FLOAT(Code) | | |
TYPE_INT | final public static int TYPE_INT(Code) | | |
TYPE_STRING | final public static int TYPE_STRING(Code) | | Defines constants for value types
|
Predicate | public Predicate(int predicate)(Code) | | Constructor
|
Predicate | public Predicate(int predicate, String key)(Code) | | Constructor
assume the value type is string
|
Predicate | public Predicate(int predicate, String key, String value)(Code) | | Constructs the predicate and key.
|
Predicate | public Predicate(int predicate, String key, int type, String value)(Code) | | Constructs the predicate and key.
|
Predicate | public Predicate(int predicate, String key, int type, String value1, String value2)(Code) | | Constructs the predicate and key.
|
getPredicate | public int getPredicate()(Code) | | Obtains the current value of the predicate
|
getType | public int getType()(Code) | | Returns the type of the value
a constant from the value types. |
setKey | public void setKey(String key)(Code) | | Overwrites the key with a different name.
Parameters: key - is the new key to use from now on. See Also: Predicate.getKey() |
setPredicate | public void setPredicate(int predicate)(Code) | | Sets the predicate
|
setType | public void setType(int type)(Code) | | Sets the value type
|
setValue | public void setValue(String value)(Code) | | Sets the value
|
setValue2 | public void setValue2(String value)(Code) | | Sets the value type
|
toSQL | public String toSQL(int annoClass, Object arg)(Code) | | Returns a SQL query statement for annotation search.
Parameters: annoClass - is the class to search for Parameters: arg - could be a String for TR arg, or a Integerfor TR call position. See Also: org.griphyn.vdl.dbschema.Annotation |
toString | public String toString()(Code) | | Returns a string representation
|
|
|