org.enableit.db
Class DBUpdate
java.lang.Object
|
+--org.enableit.db.DBStatement
|
+--org.enableit.db.DBUpdate
- public class DBUpdate
- extends DBStatement
Encapsulate the information required to perform a database update,
(includes deletes and data definition statements).
The 'base' SQL is considered that part before any 'WHERE' clause.
- Author:
- Tim Stephenson
Field Summary |
static java.lang.String |
ABOUT
CVS info ABOUT this class and its current version |
protected java.util.List |
joins
|
Constructor Summary |
DBUpdate()
Default Constructor |
DBUpdate(java.lang.String baseSql)
Construct instance and set the base SQL statement. |
Method Summary |
void |
addJoin(org.enableit.db.beans.ForeignKey fk)
|
void |
addUpdate(org.enableit.db.beans.Column col,
java.lang.Object val)
|
java.lang.String |
getBaseSql()
This method appends SQL to represent any update clauses added with
addUpdate to the original base SQL passed to the constructor. |
java.util.List |
getUpdParams()
|
Methods inherited from class org.enableit.db.DBStatement |
addFilter, appendWhereClause, getFilterIterator, getParam, getParameters, getSql, getWhereClause, setBaseSql, setDateFormat, setDateTimeFormat, setTimeFormat, setWhereClause |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ABOUT
public static final java.lang.String ABOUT
- CVS info ABOUT this class and its current version
- See Also:
- Constant Field Values
joins
protected java.util.List joins
DBUpdate
public DBUpdate()
- Default Constructor
DBUpdate
public DBUpdate(java.lang.String baseSql)
- Construct instance and set the base SQL statement.
getBaseSql
public java.lang.String getBaseSql()
- This method appends SQL to represent any update clauses added with
addUpdate
to the original base SQL passed to the constructor.
- Overrides:
getBaseSql
in class DBStatement
- Returns:
- baseSql The base SQL (up to the start of the WHERE clause).
addUpdate
public void addUpdate(org.enableit.db.beans.Column col,
java.lang.Object val)
getUpdParams
public java.util.List getUpdParams()
- Returns:
List
of update clause parameters.
addJoin
public void addJoin(org.enableit.db.beans.ForeignKey fk)
- Parameters:
fk
- Encapsulates information on what to join to.
Copyright © 1999-2004 enableIT.org. All Rights Reserved.