ca.spaz.sql
Class SQLUpdate

java.lang.Object
  extended by ca.spaz.sql.SQLStatement
      extended by ca.spaz.sql.SQLSelectableStatement
          extended by ca.spaz.sql.SQLUpdate
All Implemented Interfaces:
Columns

public class SQLUpdate
extends SQLSelectableStatement
implements Columns

Simplifies constructing SQL Update Queries.


Field Summary
 
Fields inherited from class ca.spaz.sql.SQLSelectableStatement
EQ, GT, LT
 
Fields inherited from class ca.spaz.sql.SQLStatement
table
 
Constructor Summary
SQLUpdate(java.lang.String tableName)
          Create a new SQLUpdate command for the given table
 
Method Summary
protected  void doExecute(java.sql.Connection con)
          Overrides execute() and calls executeUpdate()
 SQLColumnSet getColumns()
          Retrieve the cols from the SQLInsert
protected  java.lang.String getQueryString()
          Generate the SQL string for an UPDATE command.
 
Methods inherited from class ca.spaz.sql.SQLSelectableStatement
addWhere, addWhere, addWhere, addWhere, addWhere, addWhere, addWhere, addWhere, addWhereLike, getWhere
 
Methods inherited from class ca.spaz.sql.SQLStatement
doExecuteQuery, execute, executeQuery, getTableName, isExecuteSupported, isQuerySupported, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLUpdate

public SQLUpdate(java.lang.String tableName)
Create a new SQLUpdate command for the given table

Parameters:
tableName - the name of the table to update on
Method Detail

doExecute

protected void doExecute(java.sql.Connection con)
                  throws java.sql.SQLException
Overrides execute() and calls executeUpdate()

Overrides:
doExecute in class SQLStatement
Throws:
java.sql.SQLException

getQueryString

protected java.lang.String getQueryString()
Generate the SQL string for an UPDATE command.

Specified by:
getQueryString in class SQLStatement

getColumns

public SQLColumnSet getColumns()
Retrieve the cols from the SQLInsert

Specified by:
getColumns in interface Columns
Returns:
Returns the cols.


Copyright © 2005 Spaz. All Rights Reserved.