|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javatools.db.DbExpr
|
+--javatools.db.DbColumn
A class that represents a particular column within a particular DbTable. Based upon class DbColumn by Chris Bitmead.
| Constructor Summary | |
DbColumn(DbAbstractTable table,
int index)
Creates a new DbColumn. |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Checks if a column equals another column. |
int |
getIndex()
Returns the index of the column among the fields of the table. |
java.lang.String |
getName()
Returns the column name. |
java.lang.String |
getQueryString()
Returns the query string related to this column. |
int |
getSize()
Returns the display size of this column. |
DbExpr |
getSubExpr(DbColumn[] cols)
Currently unused. |
int |
setSqlValues(java.sql.PreparedStatement ps,
int i)
Sets, in a prepared statement, the value related to this column, that will be used, e.g., in an INSERT operation. |
DbExpr |
substituteColumn(DbColumn oldCol,
DbColumn newCol)
Currently unused. |
java.lang.String |
toString()
The fully qualified name of this column. |
void |
usesTables(java.util.Set c)
Adds to the set, the currently indexed table. |
| Methods inherited from class javatools.db.DbExpr |
and, containsAllStrings, containsAllStrings, count, dateTrunc, equal, greaterThan, greaterThanOrEqual, in, in, isNotNull, isNull, lessThan, lessThanOrEqual, like, lower, max, min, notEqual, notIn, notIn, or, upper, usesTables |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DbColumn(DbAbstractTable table,
int index)
table - The table to get the column from.index - The position of table's field.| Method Detail |
public java.lang.String getQueryString()
getQueryString in class DbExprpublic java.lang.String getName()
public int setSqlValues(java.sql.PreparedStatement ps,
int i)
throws DbException
setSqlValues in class DbExprps - The prepared statement.i - The index.
DbException - If something goes wrong.public int getSize()
public int getIndex()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The object to compare to.
true: if it is equal;
false: otherwise.public java.lang.String toString()
toString in class java.lang.Objectpublic void usesTables(java.util.Set c)
usesTables in interface DbTableUserusesTables in class DbExprc - The set to add current column to.
public DbExpr getSubExpr(DbColumn[] cols)
throws DbException
cols - An array of columns. Only specified columns are taken in the result.
null otherwise.
DbException - If something goes wrong.
public DbExpr substituteColumn(DbColumn oldCol,
DbColumn newCol)
throws DbException
oldCol with
newCol.
oldCol - The column to be replaced.newCol - The column to put.
newCol if this column represents oldCol, this column
otherwise.
DbException - If something goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||