|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.dbtools.DBWhere
public class DBWhere
DBWhere
represents an SQL WHERE clause.
Field Summary | |
---|---|
static int |
KEY_AUTO_INDEX
|
static int |
KEY_FULL
|
static int |
KEY_PARTIAL_ALL
|
static int |
KEY_PARTIAL_ALL_EMPTY
|
static int |
KEY_PARTIAL_FIRST
|
Constructor Summary | |
---|---|
DBWhere(DBFactory fact)
Constructor |
Method Summary | |
---|---|
java.lang.String |
_AND_(java.lang.String op1,
java.lang.String op2)
"operand1 AND operand2" |
java.lang.String |
_OR_(java.lang.String op1,
java.lang.String op2)
"operand1 OR operand2" |
java.lang.String |
AND_(java.lang.String op)
"AND operand" |
java.lang.String |
AND(java.lang.String[] op)
"(operand AND ...)" |
java.lang.String |
AND(java.lang.String op1,
java.lang.String op2)
"(operand1 AND operand2)" |
java.lang.String |
AND(java.lang.String op1,
java.lang.String op2,
java.lang.String op3)
"(operand1 AND operand2 AND operand3)" |
java.lang.String |
AND(java.lang.String op1,
java.lang.String op2,
java.lang.String op3,
java.lang.String op4)
"(operand1 AND operand2 AND operand3 AND operand4)" |
java.lang.String |
AND(java.lang.String op1,
java.lang.String op2,
java.lang.String op3,
java.lang.String op4,
java.lang.String op5)
"(operand1 AND operand2 AND operand3 AND operand4 AND operand5)" |
java.lang.StringBuffer |
append(java.lang.String s)
Append the specified String to the internal accumulator StringBuffer |
java.lang.String |
EQ(java.lang.String fld,
boolean value)
"(field = value)" |
java.lang.String |
EQ(java.lang.String fld,
double value)
"(field = value)" |
java.lang.String |
EQ(java.lang.String fld,
int value)
"(field = value)" |
java.lang.String |
EQ(java.lang.String fld,
long value)
"(field = value)" |
java.lang.String |
EQ(java.lang.String fld,
java.lang.Object value)
"(field = value)" |
java.lang.String |
GE(java.lang.String fld,
double value)
"(field >= value)" |
java.lang.String |
GE(java.lang.String fld,
int value)
"(field >= value)" |
java.lang.String |
GE(java.lang.String fld,
long value)
"(field >= value)" |
java.lang.String |
GE(java.lang.String fld,
java.lang.Object value)
"(field >= value)" |
java.lang.String |
GT(java.lang.String fld,
double value)
"(field > value)" |
java.lang.String |
GT(java.lang.String fld,
int value)
"(field > value)" |
java.lang.String |
GT(java.lang.String fld,
long value)
"(field > value)" |
java.lang.String |
GT(java.lang.String fld,
java.lang.Object value)
"(field > value)" |
java.lang.String |
INLIST(java.lang.String fld,
int[] list)
"(field=value0 OR field=value1 ...)" |
java.lang.String |
INLIST(java.lang.String fld,
java.lang.Iterable<?> list)
"(field=value0 OR field=value1 ...)" |
java.lang.String |
INLIST(java.lang.String fld,
long[] list)
"(field=value0 OR field=value1 ...)" |
java.lang.String |
INLIST(java.lang.String fld,
java.lang.Object[] list)
"(field=value0 OR field=value1 ...)" |
java.lang.String |
LE(java.lang.String fld,
double value)
"(field <= value)" |
java.lang.String |
LE(java.lang.String fld,
int value)
"(field <= value)" |
java.lang.String |
LE(java.lang.String fld,
long value)
"(field <= value)" |
java.lang.String |
LE(java.lang.String fld,
java.lang.Object value)
"(field <= value)" |
java.lang.String |
LIKE(java.lang.String fld,
java.lang.String value)
"field LIKE '...%...'" |
java.lang.String |
LT(java.lang.String fld,
double value)
"(field < value)" |
java.lang.String |
LT(java.lang.String fld,
int value)
"(field < value)" |
java.lang.String |
LT(java.lang.String fld,
long value)
"(field < value)" |
java.lang.String |
LT(java.lang.String fld,
java.lang.Object value)
"(field < value)" |
static void |
main(java.lang.String[] argv)
Main entry point for testing/debugging |
java.lang.String |
NE(java.lang.String fld,
boolean value)
"(field != value)" |
java.lang.String |
NE(java.lang.String fld,
double value)
"(field != value)" |
java.lang.String |
NE(java.lang.String fld,
int value)
"(field != value)" |
java.lang.String |
NE(java.lang.String fld,
long value)
"(field != value)" |
java.lang.String |
NE(java.lang.String fld,
java.lang.Object value)
"(field != value)" |
java.lang.String |
OR_(java.lang.String op)
"OR operand" |
java.lang.String |
OR(java.lang.String[] op)
"(operand OR ...)" |
java.lang.String |
OR(java.lang.String op1,
java.lang.String op2)
"(operand1 OR operand2)" |
java.lang.String |
OR(java.lang.String op1,
java.lang.String op2,
java.lang.String op3)
"(operand1 OR operand2 OR operand3)" |
java.lang.String |
OR(java.lang.String op1,
java.lang.String op2,
java.lang.String op3,
java.lang.String op4)
"(operand1 OR operand2 OR operand3 OR operand4)" |
java.lang.String |
STARTSWITH(java.lang.String fld,
java.lang.String value)
"field LIKE '...%...'" |
java.lang.String |
toString()
Returns a String representation of this DBWhere instance |
java.lang.String |
WHERE_(java.lang.String conditions)
"WHERE conditions" |
java.lang.String |
WHERE(java.lang.String conditions)
"WHERE (conditions)" |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int KEY_FULL
public static int KEY_PARTIAL_FIRST
public static int KEY_PARTIAL_ALL
public static int KEY_PARTIAL_ALL_EMPTY
public static int KEY_AUTO_INDEX
Constructor Detail |
---|
public DBWhere(DBFactory fact)
fact
- The table DBFactoryMethod Detail |
---|
public java.lang.StringBuffer append(java.lang.String s)
s
- The String to append
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String AND_(java.lang.String op)
op
- The operand
public java.lang.String _AND_(java.lang.String op1, java.lang.String op2)
op1
- The first operandop2
- The second operand
public java.lang.String AND(java.lang.String op1, java.lang.String op2)
op1
- The first operandop2
- The second operand
public java.lang.String AND(java.lang.String op1, java.lang.String op2, java.lang.String op3)
op1
- The first operandop2
- The second operandop3
- The third operand
public java.lang.String AND(java.lang.String op1, java.lang.String op2, java.lang.String op3, java.lang.String op4)
op1
- The first operandop2
- The second operandop3
- The third operandop4
- The forth operand
public java.lang.String AND(java.lang.String op1, java.lang.String op2, java.lang.String op3, java.lang.String op4, java.lang.String op5)
op1
- The first operandop2
- The second operandop3
- The third operandop4
- The forth operandop5
- The fifth operand
public java.lang.String AND(java.lang.String[] op)
op
- An array of operands
public java.lang.String OR_(java.lang.String op)
op
- The operand
public java.lang.String _OR_(java.lang.String op1, java.lang.String op2)
op1
- The first operandop2
- The second operand
public java.lang.String OR(java.lang.String op1, java.lang.String op2)
op1
- The first operandop2
- The second operand
public java.lang.String OR(java.lang.String op1, java.lang.String op2, java.lang.String op3)
op1
- The first operandop2
- The second operandop3
- The third operand
public java.lang.String OR(java.lang.String op1, java.lang.String op2, java.lang.String op3, java.lang.String op4)
op1
- The first operandop2
- The second operandop3
- The third operandop4
- The forth operand
public java.lang.String OR(java.lang.String[] op)
op
- An array of operands
public java.lang.String EQ(java.lang.String fld, java.lang.Object value)
fld
- The table fieldvalue
- The value
public java.lang.String EQ(java.lang.String fld, int value)
fld
- The table fieldvalue
- The value
public java.lang.String EQ(java.lang.String fld, long value)
fld
- The table fieldvalue
- The value
public java.lang.String EQ(java.lang.String fld, double value)
fld
- The table fieldvalue
- The value
public java.lang.String EQ(java.lang.String fld, boolean value)
fld
- The table fieldvalue
- The value
public java.lang.String NE(java.lang.String fld, java.lang.Object value)
fld
- The table fieldvalue
- The value
public java.lang.String NE(java.lang.String fld, int value)
fld
- The table fieldvalue
- The value
public java.lang.String NE(java.lang.String fld, long value)
fld
- The table fieldvalue
- The value
public java.lang.String NE(java.lang.String fld, double value)
fld
- The table fieldvalue
- The value
public java.lang.String NE(java.lang.String fld, boolean value)
fld
- The table fieldvalue
- The value
public java.lang.String GT(java.lang.String fld, java.lang.Object value)
fld
- The table fieldvalue
- The value
public java.lang.String GT(java.lang.String fld, int value)
fld
- The table fieldvalue
- The value
public java.lang.String GT(java.lang.String fld, long value)
fld
- The table fieldvalue
- The value
public java.lang.String GT(java.lang.String fld, double value)
fld
- The table fieldvalue
- The value
public java.lang.String GE(java.lang.String fld, java.lang.Object value)
fld
- The table fieldvalue
- The value
public java.lang.String GE(java.lang.String fld, int value)
fld
- The table fieldvalue
- The value
public java.lang.String GE(java.lang.String fld, long value)
fld
- The table fieldvalue
- The value
public java.lang.String GE(java.lang.String fld, double value)
fld
- The table fieldvalue
- The value
public java.lang.String LT(java.lang.String fld, java.lang.Object value)
fld
- The table fieldvalue
- The value
public java.lang.String LT(java.lang.String fld, int value)
fld
- The table fieldvalue
- The value
public java.lang.String LT(java.lang.String fld, long value)
fld
- The table fieldvalue
- The value
public java.lang.String LT(java.lang.String fld, double value)
fld
- The table fieldvalue
- The value
public java.lang.String LE(java.lang.String fld, java.lang.Object value)
fld
- The table fieldvalue
- The value
public java.lang.String LE(java.lang.String fld, int value)
fld
- The table fieldvalue
- The value
public java.lang.String LE(java.lang.String fld, long value)
fld
- The table fieldvalue
- The value
public java.lang.String LE(java.lang.String fld, double value)
fld
- The table fieldvalue
- The value
public java.lang.String LIKE(java.lang.String fld, java.lang.String value)
fld
- The table fieldvalue
- The value (containing wildcards)
public java.lang.String STARTSWITH(java.lang.String fld, java.lang.String value)
fld
- The table fieldvalue
- The 'startsWith' value (no wildcards!)
public java.lang.String INLIST(java.lang.String fld, java.lang.Iterable<?> list)
fld
- The table fieldlist
- An array of values
public java.lang.String INLIST(java.lang.String fld, java.lang.Object[] list)
fld
- The table fieldlist
- An array of values
public java.lang.String INLIST(java.lang.String fld, int[] list)
fld
- The table fieldlist
- An array of values
public java.lang.String INLIST(java.lang.String fld, long[] list)
fld
- The table fieldlist
- An array of values
public java.lang.String WHERE_(java.lang.String conditions)
conditions
- The where conditionspublic java.lang.String WHERE(java.lang.String conditions)
conditions
- The where conditionspublic static void main(java.lang.String[] argv)
argv
- The command-line arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |