org.edg.info.sqlutil.parsql
Class UpdateStatement

java.lang.Object
  extended byorg.edg.info.sqlutil.parsql.UpdateStatement
All Implemented Interfaces:
java.io.Serializable, Statement

public class UpdateStatement
extends java.lang.Object
implements Statement

UpdateStatement: an SQL UPDATE statement.

See Also:
Serialized Form

Constructor Summary
UpdateStatement(java.lang.String tab)
          Create an UPDATE statement on a given table.
 
Method Summary
 void addSet(java.util.Hashtable t)
          Insert a SET clause in the UPDATE statement
 void addWhere(ExpSelConst w)
          Insert a WHERE clause in the UPDATE statement
 ExpSelConst getColumnUpdate(java.lang.String col)
          Get the SQL expression that specifies a given column's update value.
 java.util.Hashtable getSet()
          Get the whole SET...
 java.lang.String getTable()
          DOCUMENT ME!
 ExpSelConst getWhere()
          Get the WHERE clause of this UPDATE statement.
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UpdateStatement

public UpdateStatement(java.lang.String tab)
Create an UPDATE statement on a given table.

Parameters:
tab - DOCUMENT ME!
Method Detail

getColumnUpdate

public ExpSelConst getColumnUpdate(java.lang.String col)
Get the SQL expression that specifies a given column's update value. (for example, a Constant object like "Smith").

Parameters:
col - The column name.
Returns:
a ExpSelConst, like a Constant representing a value, or a more complex SQL expression.

getSet

public java.util.Hashtable getSet()
Get the whole SET... clause

Returns:
A Hashtable, where keys are column names (the columns to update), and values are ExpSelConst objects (Expressions that specify column values: for example, Constant objects like "Smith").

getTable

public java.lang.String getTable()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getWhere

public ExpSelConst getWhere()
Get the WHERE clause of this UPDATE statement.

Returns:
An SQL Expression compatible with a WHERE... clause.

addSet

public void addSet(java.util.Hashtable t)
Insert a SET clause in the UPDATE statement

Parameters:
t - A Hashtable, where keys are column names (the columns to update), and values are ExpSelConst objects (the column values). For example, the values may be Constant objects (like "Smith") or more complex SQL Expressions.

addWhere

public void addWhere(ExpSelConst w)
Insert a WHERE clause in the UPDATE statement

Parameters:
w - An SQL Expression compatible with a WHERE... clause.

toString

public java.lang.String toString()
DOCUMENT ME!

Returns:
DOCUMENT ME!