public class SqlUpdater
extends java.lang.Object
The SQL generated is of the form "update TABLE set WHATNOT=?, NOTWHAT=? where THIS=? and THAT=? and..."; if you want anything more complex you should handle that yourself.
Creates and retains a prepared statement so you can hang onto it and use it over and over on the same connection for better performance.
Copyright 2008 Partner Software, Inc.
| Constructor and Description |
|---|
SqlUpdater(SqlTable table) |
SqlUpdater(SqlTable table,
java.util.List<java.lang.String> columnNameList,
java.util.List<java.lang.String> keyNameList) |
| Modifier and Type | Method and Description |
|---|---|
SqlTable |
getTable() |
void |
update(Cog record)
Update a row using the given Cog of values to get the keys from.
|
void |
update(java.util.List<java.lang.Object> values)
Deletes a row with the given list of key values.
|
void |
update(Naming<java.lang.Object> record)
Update a row using the given Naming of values to get the values and keys from.
|
void |
update(java.lang.Object... values)
Update a row with the given array of key values.
|
public SqlUpdater(SqlTable table) throws java.sql.SQLException
java.sql.SQLExceptionpublic SqlUpdater(SqlTable table, java.util.List<java.lang.String> columnNameList, java.util.List<java.lang.String> keyNameList) throws java.sql.SQLException
java.sql.SQLExceptionpublic void update(Naming<java.lang.Object> record) throws java.sql.SQLException
java.sql.SQLExceptionpublic void update(Cog record) throws java.sql.SQLException
java.sql.SQLExceptionpublic void update(java.lang.Object... values)
throws java.sql.SQLException
values - java.sql.SQLExceptionpublic void update(java.util.List<java.lang.Object> values)
throws java.sql.SQLException
java.sql.SQLExceptionpublic SqlTable getTable()