public abstract class AbstractUpdateTask extends AbstractWorkTask implements IUpdateColumns
prefix
Constructor and Description |
---|
AbstractUpdateTask() |
Modifier and Type | Method and Description |
---|---|
protected void |
initCols(Collection<IColumn> cols)
Abstract method to assemble list of columns necessary.
|
void |
run(IContext context)
Run the task using provided context.
|
boolean |
shouldRun(IContext context)
Check if the task should run.
|
void |
sqlUpdateRowsWithKey(Connection conn,
List<String> colnames,
Collection<String> updatecolumns,
List<String[]> rows,
IAnonymization[] keys)
Update a key column needs to update all related references.
|
void |
sqlUpdateRowsWithKeyAuto(Connection conn,
List<String> colnames,
Collection<String> updatecolumns,
List<String[]> rows,
IAnonymization anonymization)
Update with returned autogenerated value as key.
|
assignCell, executeBatch, finish, getAllColumns, getColumns, getDescription, getWhere, getWhere, prepareInputs, registerAnonymizations, schemaPrefix, setLogPrefix, sql, sqlColumnsWrap, sqlCountRows, sqlExecuteUpdate, sqlInsertRows, sqlReadRows, sqlUpdateRows, sqlUpdateRows, sqlUpdateRowsNoIndex, start, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnonymizations, getIndexColumns
public void run(IContext context) throws Throwable
ITask
public boolean shouldRun(IContext context)
ITask
public void sqlUpdateRowsWithKey(Connection conn, List<String> colnames, Collection<String> updatecolumns, List<String[]> rows, IAnonymization[] keys) throws SQLException, IOException
conn
- Connectioncolnames
- list of columnsupdatecolumns
- c\list of column names to be updatedrows
- datakeys
- keysSQLException
- when SQL issuesIOException
- when problems reading config filepublic void sqlUpdateRowsWithKeyAuto(Connection conn, List<String> colnames, Collection<String> updatecolumns, List<String[]> rows, IAnonymization anonymization) throws IOException, SQLException
conn
- Connectioncolnames
- list of namesupdatecolumns
- list of namesrows
- dataanonymization
- anonymizationSQLException
- when SQL issuesIOException
- when problems reading mapping fileprotected void initCols(Collection<IColumn> cols)
AbstractWorkTask
initCols
in class AbstractWorkTask
cols
- list of column definitionsCopyright © 2021. All rights reserved.