public abstract class Update extends DatabaseAccessor
execute()
,
finish()
,
Serialized FormConstructor and Description |
---|
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 |
Modifier and Type | Method and Description |
---|---|
abstract void |
evaluateValues_xjal(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_xjal(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 |
toString() |
destroy, getName
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 specifiedname
- 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_xjal(Object[], Object[][])
@AnyLogicInternalCodegenAPI public abstract void evaluateValues_xjal(java.lang.Object[] keyValues, java.lang.Object[][] updateValues)
keyValues
and
updateValues
arrayskeyValues
- 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_xjal(Object[], Object[][])
method)public void finish()
public java.lang.String toString()
toString
in class ConnectivityBase
Copyright © AnyLogic North America, LLC. All Rights Reserved.