agonism.dovetail.site
Class  UpdateRecord
java.lang.Object
  |
  +--agonism.dovetail.site.UpdateRecord
- public class UpdateRecord- extends java.lang.Object
| Field Summary | 
| static org.log4j.Category | C
 | 
 
 
| Method Summary | 
|  boolean | execute(java.sql.Connection c,
        Form form,
        agonism.dovetail.db.IParameterSource source,
        int id)Update the record.
 | 
|  boolean | execute(java.sql.Connection c,
        Form form,
        agonism.dovetail.db.IParameterSource source,
        int id,
        Column[] columns)Update the record.
 | 
|  boolean | execute(Form form,
        int id)Update the record.
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
C
public static final org.log4j.Category C
UpdateRecord
public UpdateRecord(java.lang.String tableName)
- Updated a record in a table.- 
- Parameters:
- tableName- must be the name of a table in the current schema
- See Also: 
- Schema.getSchema(),- Schema.getTable(java.lang.String)
 
UpdateRecord
public UpdateRecord(Table table)
- Update a record in table.
execute
public boolean execute(Form form,
                       int id)
- Update the record. The form's IRequestContextwill be used to report any
 exceptions which occur while inserting the record. This method uses the Connection and
 IParameterSource provided by the Form. All columns for which a value is
 present insourcewill be updated.
- 
- Parameters:
- id- should be the primary key of the record to be updated
- Returns:
- whether the creation of the new record was successful
 
execute
public boolean execute(java.sql.Connection c,
                       Form form,
                       agonism.dovetail.db.IParameterSource source,
                       int id)
- Update the record. The form's IRequestContextwill be used to report any
 exceptions which occur while inserting the record. All columns for which a value is
 present insourcewill be updated.
- 
- Parameters:
- source- should contain a value for all columns which are required by the table
 specified in the constructor.
- id- should be the primary key of the record to be updated
- Returns:
- whether the creation of the new record was successful
 
execute
public boolean execute(java.sql.Connection c,
                       Form form,
                       agonism.dovetail.db.IParameterSource source,
                       int id,
                       Column[] columns)
- Update the record. The form's IRequestContextwill be used to report any
 exceptions which occur while inserting the record.
- 
- Parameters:
- source- should contain a value for all columns which are required by the table
 specified in the constructor.
- id- should be the primary key of the record to be updated
- columns- an array of columns whose values should be update from- source. If this
 parameter is null, then all columns for which a value is present in the- sourcewill be updated.
- Returns:
- whether the creation of the new record was successful