public abstract class AbstractContext extends Object implements IContext
IContext.RunType
LOG_BEGIN, LOG_END, LOG_INDENTATION
Constructor and Description |
---|
AbstractContext() |
AbstractContext(IContext.RunType runtype,
String[] params) |
Modifier and Type | Method and Description |
---|---|
static IContext |
createAnonymizeContext(Connection connection)
Factory method for anonymization context.
|
static IContext |
createEraseContext(Connection connection,
String[] params)
Factory method for anonymization erase context.
|
static IContext |
createSarContext(Connection connection,
String[] params,
ISarWriter sarwriter)
Factory method for anonymization SAR context.
|
String[] |
getRunParams()
Returns the parameter values to be used by Erase or Sar tasks.
|
IContext.RunType |
getRunType()
Get type of tasks that will be executed by ITask.run(IContext).
|
ISarWriter |
getSarWriter()
Writer to receive output to Subject Access Request.
|
boolean |
isAutoCommit()
Is it using auto-commit mode?
Please note that many operations involving setting unique keys may not work in autocommit mode. |
boolean |
isRepeatableRandom()
TRUE if random sequence should repeat each time it is run, in order to get predictable results.
|
void |
setAutoCommit(boolean autocommit)
Sets the AutoCommit mode.
AutoCommit (true) - commits for every insert/update and is easier to debug Commit (false) - uses batch inserts/updates which is generally faster |
void |
setRepeatableRandom(boolean repeatable)
Set to TRUE if random sequence should repeat each time it is run, in order to get predictable results.
|
void |
setRunParams(String[] params)
Sets the values of the list of %PARAMETER% parameters to be used in Erase or Sar tasks.
|
void |
setRunType(IContext.RunType run)
Set type of tasks to execute when tasks is executed by ITask.run(IContext).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConnection, getLogBegin, getLogEnd, getLogIndentation
public AbstractContext(IContext.RunType runtype, String[] params)
public AbstractContext()
public boolean isAutoCommit()
IContext
isAutoCommit
in interface IContext
public void setAutoCommit(boolean autocommit)
IContext
setAutoCommit
in interface IContext
autocommit
- true if autocommit should be usedpublic void setRunParams(String[] params)
IContext
setRunParams
in interface IContext
params
- parameterpublic String[] getRunParams()
IContext
getRunParams
in interface IContext
public void setRunType(IContext.RunType run)
IContext
setRunType
in interface IContext
run
- RunTypepublic IContext.RunType getRunType()
IContext
getRunType
in interface IContext
public boolean isRepeatableRandom()
IContext
isRepeatableRandom
in interface IContext
public void setRepeatableRandom(boolean repeatable)
IContext
setRepeatableRandom
in interface IContext
repeatable
- should it be repeatablepublic ISarWriter getSarWriter()
IContext
getSarWriter
in interface IContext
public static IContext createAnonymizeContext(Connection connection)
connection
- connectionpublic static IContext createEraseContext(Connection connection, String[] params)
connection
- connectionparams
- Erase parameterspublic static IContext createSarContext(Connection connection, String[] params, ISarWriter sarwriter)
connection
- connectionparams
- SAR parameterssarwriter
- SAR writerCopyright © 2021. All rights reserved.