|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.sql.SqlUpdater
public class SqlUpdater
Tool to simplify basic key-type updates to an SqlTable.
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 Summary | |
|---|---|
SqlUpdater(SqlTable table)
|
|
SqlUpdater(SqlTable table,
java.util.List<java.lang.String> columnNameList,
java.util.List<java.lang.String> keyNameList)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlUpdater(SqlTable table)
throws java.sql.SQLException
java.sql.SQLException
public SqlUpdater(SqlTable table,
java.util.List<java.lang.String> columnNameList,
java.util.List<java.lang.String> keyNameList)
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public void update(Naming<java.lang.Object> record)
throws java.sql.SQLException
java.sql.SQLException
public void update(Cog record)
throws java.sql.SQLException
java.sql.SQLException
public void update(java.lang.Object... values)
throws java.sql.SQLException
values -
java.sql.SQLException
public void update(java.util.List<java.lang.Object> values)
throws java.sql.SQLException
java.sql.SQLExceptionpublic SqlTable getTable()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||