|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.util.db.Criteria.Criterion
This is an inner class that describes an object in the criteria.
Field Summary | |
private Criteria.Criterion |
and
Another criterion connected to this one by an AND clause. |
static java.lang.String |
AND
|
private java.lang.String |
column
Column name. |
private java.lang.String |
comparison
Comparison value. |
private DB |
db
The DB adaptor which might be used to get db specific variations of sql. |
private boolean |
ignoreStringCase
flag to ignore case in comparision |
private Criteria.Criterion |
or
Another Criterion connected to this one by an OR clause. |
static java.lang.String |
OR
|
private java.lang.String |
table
Table name. |
private java.lang.Object |
value
Value of the CO. |
Constructor Summary | |
private |
Criteria.Criterion(java.lang.Object val,
java.lang.String comp)
Creates a new instance, initializing a couple members. |
(package private) |
Criteria.Criterion(java.lang.String tableColumn,
java.lang.Object val)
Create a new instance. |
(package private) |
Criteria.Criterion(java.lang.String tableColumn,
java.lang.Object val,
java.lang.String comp)
Create a new instance. |
(package private) |
Criteria.Criterion(java.lang.String table,
java.lang.String column,
java.lang.Object val)
Create a new instance. |
(package private) |
Criteria.Criterion(java.lang.String table,
java.lang.String column,
java.lang.Object val,
java.lang.String comp)
Create a new instance. |
Method Summary | |
private void |
addCriterionTable(Criteria.Criterion c,
StringStackBuffer s)
|
Criteria.Criterion |
and(Criteria.Criterion criterion)
Append a Criteria onto this Criteria's AND field. |
void |
appendPsTo(java.lang.StringBuffer sb,
java.util.List params)
Appends a Prepared Statement representation of the Criterion onto the buffer. |
void |
appendTo(java.lang.StringBuffer sb)
Appends a representation of the Criterion onto the buffer. |
boolean |
equals(java.lang.Object obj)
This method checks another Criteria to see if they contain the same attributes and hashtable entries. |
java.lang.String[] |
getAllTables()
|
Criteria.Criterion |
getAnd()
get the criterion from this Criterion's AND field. |
Criteria.Criterion[] |
getAttachedCriterion()
|
java.lang.String |
getColumn()
Get the column name. |
java.lang.String |
getComparison()
Get the comparison. |
DB |
getDb()
Get the value of db. |
Criteria.Criterion |
getOr()
get the criterion from this Criterion's AND field. |
java.lang.String |
getTable()
Get the table name. |
java.lang.Object |
getValue()
Get the value. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isIgnoreCase()
Is ignore case on or off? |
Criteria.Criterion |
or(Criteria.Criterion criterion)
Append a Criterion onto this Criterion's OR field. |
void |
setDB(DB v)
Set the value of db. |
Criteria.Criterion |
setIgnoreCase(boolean b)
Sets ignore case. |
void |
setTable(java.lang.String name)
Set the table name. |
java.lang.String |
toString()
Build a string representation of the Criterion. |
private void |
traverseCriterion(Criteria.Criterion c,
java.util.ArrayList a)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final java.lang.String AND
public static final java.lang.String OR
private java.lang.Object value
private java.lang.String comparison
private java.lang.String table
private java.lang.String column
private boolean ignoreStringCase
private DB db
private Criteria.Criterion or
private Criteria.Criterion and
Constructor Detail |
private Criteria.Criterion(java.lang.Object val, java.lang.String comp)
Criteria.Criterion(java.lang.String table, java.lang.String column, java.lang.Object val, java.lang.String comp)
table
- A String with the name of the table.column
- A String with the name of the column.val
- An Object with the value for the Criteria.comp
- A String with the comparison value.Criteria.Criterion(java.lang.String tableColumn, java.lang.Object val, java.lang.String comp)
tableColumn
- A String with the full name of the
column.val
- An Object with the value for the Criteria.comp
- A String with the comparison value.Criteria.Criterion(java.lang.String table, java.lang.String column, java.lang.Object val)
table
- A String with the name of the table.column
- A String with the name of the column.val
- An Object with the value for the Criteria.Criteria.Criterion(java.lang.String tableColumn, java.lang.Object val)
tableColumn
- A String with the full name of the
column.val
- An Object with the value for the Criteria.Method Detail |
public java.lang.String getColumn()
public void setTable(java.lang.String name)
name
- A String with the table name.public java.lang.String getTable()
public java.lang.String getComparison()
public java.lang.Object getValue()
public DB getDb()
public void setDB(DB v)
v
- Value to assign to db.public Criteria.Criterion setIgnoreCase(boolean b)
b
- True if case should be ignored.public boolean isIgnoreCase()
public Criteria.Criterion getAnd()
public Criteria.Criterion and(Criteria.Criterion criterion)
public Criteria.Criterion getOr()
public Criteria.Criterion or(Criteria.Criterion criterion)
public void appendTo(java.lang.StringBuffer sb)
public void appendPsTo(java.lang.StringBuffer sb, java.util.List params)
sb
- The stringbuffer that will receive the Prepared Statementparams
- A list to which Prepared Statement parameters
will be appendedpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String[] getAllTables()
private void addCriterionTable(Criteria.Criterion c, StringStackBuffer s)
public Criteria.Criterion[] getAttachedCriterion()
private void traverseCriterion(Criteria.Criterion c, java.util.ArrayList a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |