|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.connectivity.Update
public abstract class Update
Object performing rows update in the database table
This object is only available in the AnyLogic Professional
execute(),
finish(),
Serialized Form| Constructor Summary | |
|---|---|
Update(java.lang.String name,
Database database,
java.lang.String tableName,
java.lang.String keyColumnName,
java.lang.String[][] columnsToUpdate)
Creates new Update object for table with given name with names of
key column to be checked and columns to be updated specified |
|
| Method Summary | |
|---|---|
void |
destroy()
Releases resources acquired by this object Also destroys all not destroyed contributors associated with this object Doest nothing if object is already destroyed |
abstract void |
evaluateValues(java.lang.Object[] keyValues,
java.lang.Object[][] updateValues)
This method should be overridden to fill keyValues and
updateValues arrays |
int |
execute()
Performs update of rows with current values (provided with evaluateValues(Object[], Object[][]) method) |
void |
finish()
Resets this object (after multiple update operations) - releases resources May be called after all execute() operations completed. |
java.lang.String |
getName()
Returns the name of this object |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Update(java.lang.String name,
Database database,
java.lang.String tableName,
java.lang.String keyColumnName,
java.lang.String[][] columnsToUpdate)
Update object for table with given name with names of
key column to be checked and columns to be updated specified
name - object name (decoration purpose)database - the Database objecttableName - the name of the table to be updatedkeyColumnName - the name of key columncolumnsToUpdate - array of column names to be affected by this update. This
array is 2-dimensional: first dimension enumerates update-sets which
correspond to some values of key column respectively; second dimension
enumerates names of updated columns for each update-set.
See also evaluateValues(Object[], Object[][])| Method Detail |
|---|
public abstract void evaluateValues(java.lang.Object[] keyValues,
java.lang.Object[][] updateValues)
keyValues and
updateValues arrays
keyValues - values for key column to be checked when applying updatesupdateValues - values for value columns to be filled when applying update
changes when corresponding key-checks succeedpublic int execute()
evaluateValues(Object[], Object[][]) method)
public void finish()
execute() operations completed.Database destroy and disconnect
public java.lang.String toString()
public final java.lang.String getName()
public final void destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||