|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gibello.zql.ZUpdate
public class ZUpdate
ZUpdate: an SQL UPDATE statement.
Constructor Summary | |
---|---|
ZUpdate(java.lang.String tab)
Create an UPDATE statement on a given table. |
Method Summary | |
---|---|
void |
addColumnUpdate(java.lang.String col,
ZExp val)
Add one column=value pair to the SET... clause This method also keeps track of the column order |
void |
addSet(java.util.Hashtable t)
Insert a SET... clause in the UPDATE statement |
void |
addWhere(ZExp w)
Insert a WHERE... clause in the UPDATE statement |
java.lang.String |
getAlias()
|
ZExp |
getColumnUpdate(int index)
Get the SQL expression that specifies a given column's update value. |
ZExp |
getColumnUpdate(java.lang.String col)
Get the SQL expression that specifies a given column's update value. |
int |
getColumnUpdateCount()
Returns the number of column/value pairs in the SET... clause. |
java.lang.String |
getColumnUpdateName(int index)
Get the column name that corresponds to a given index. |
java.util.Hashtable |
getSet()
Get the whole SET... clause |
java.lang.String |
getTable()
|
ZExp |
getWhere()
Get the WHERE clause of this UPDATE statement. |
void |
setAlias(java.lang.String alias)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ZUpdate(java.lang.String tab)
Method Detail |
---|
public java.lang.String getTable()
public void setAlias(java.lang.String alias)
public java.lang.String getAlias()
public void addSet(java.util.Hashtable t)
t
- A Hashtable, where keys are column names (the columns to update),
and values are ZExp objects (the column values).
For example, the values may be ZConstant objects (like "Smith") or
more complex SQL Expressions.public java.util.Hashtable getSet()
public void addColumnUpdate(java.lang.String col, ZExp val)
col
- The column nameval
- The column valuepublic ZExp getColumnUpdate(java.lang.String col)
col
- The column name.
public ZExp getColumnUpdate(int index)
num
- The column index (starting from 1).
public java.lang.String getColumnUpdateName(int index)
num
- The column index (starting from 1).
public int getColumnUpdateCount()
public void addWhere(ZExp w)
w
- An SQL Expression compatible with a WHERE... clause.public ZExp getWhere()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |