info.informatica.data.sql
Class UpdateStatement

java.lang.Object
  extended by info.informatica.data.sql.SQLStatement
      extended by info.informatica.data.sql.SQLDataStatement
          extended by info.informatica.data.sql.UpdateStatement
All Implemented Interfaces:
Serializable

public class UpdateStatement
extends SQLDataStatement
implements Serializable

Update statement.

Author:
amengual at informatica dot info
See Also:
Serialized Form

Constructor Summary
UpdateStatement(MetaData metadata)
           
 
Method Summary
 void fillStatement(PreparedStatement stmt, Valueset values)
          Fills the parameters of a given statement with the default fields for this type of query.
 void fillStatementWithKeys(PreparedStatement stmt, Valueset values, Iterator<FieldName> params)
           
 SortMap getOrderBy()
           
 String getStatement()
           
 PreparedStatement prepareStatement(Connection con)
           
 void setKeysInWhere()
           
 void setWhereClause(WhereClause where)
           
 String toString()
           
 void writeTo(StringBuilder stmt)
           
 
Methods inherited from class info.informatica.data.sql.SQLDataStatement
getFlags, getTableReference, setFlags, setTableReference
 
Methods inherited from class info.informatica.data.sql.SQLStatement
fillStatement, onModify, setStatement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UpdateStatement

public UpdateStatement(MetaData metadata)
Method Detail

setWhereClause

public void setWhereClause(WhereClause where)

setKeysInWhere

public void setKeysInWhere()
                    throws DataException
Throws:
DataException

getOrderBy

public SortMap getOrderBy()

prepareStatement

public PreparedStatement prepareStatement(Connection con)
                                   throws SQLException
Overrides:
prepareStatement in class SQLStatement
Throws:
SQLException

writeTo

public void writeTo(StringBuilder stmt)
             throws DataException
Throws:
DataException

getStatement

public String getStatement()
Overrides:
getStatement in class SQLStatement

toString

public String toString()
Overrides:
toString in class SQLStatement

fillStatement

public void fillStatement(PreparedStatement stmt,
                          Valueset values)
                   throws SQLException,
                          DataException
Fills the parameters of a given statement with the default fields for this type of query.

You do not need to validate the fields first.

Overrides:
fillStatement in class SQLStatement
Parameters:
stmt - the statement
values - the set of values of the fields
Throws:
DataException - TODO
SQLException

fillStatementWithKeys

public void fillStatementWithKeys(PreparedStatement stmt,
                                  Valueset values,
                                  Iterator<FieldName> params)
                           throws SQLException,
                                  DataException
Throws:
SQLException
DataException