public abstract class AbstractUndoExecutor extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
IS_UNDO_DATA_VALIDATION_ENABLE
Switch of undo data validation
|
protected SQLUndoLog |
sqlUndoLog
The Sql undo log.
|
| Constructor and Description |
|---|
AbstractUndoExecutor(SQLUndoLog sqlUndoLog)
Instantiates a new Abstract undo executor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildCheckSql(String tableName,
String whereCondition)
build sql for query current records.
|
protected abstract String |
buildUndoSQL()
Build undo sql string.
|
protected boolean |
dataValidationAndGoOn(ConnectionProxy conn)
Data validation.
|
void |
executeOn(ConnectionProxy connectionProxy)
Execute on.
|
protected List<Field> |
getOrderedPkList(TableRecords image,
Row row,
String dbType) |
SQLUndoLog |
getSqlUndoLog()
Gets sql undo log.
|
protected abstract TableRecords |
getUndoRows()
Gets undo rows.
|
protected Map<String,List<Field>> |
parsePkValues(List<Row> rows,
List<String> pkNameList)
Parse pk values Field List.
|
protected Map<String,List<Field>> |
parsePkValues(TableRecords records)
Parse pk values Field List.
|
protected TableRecords |
queryCurrentRecords(ConnectionProxy connectionProxy)
Query current records.
|
protected void |
undoPrepare(PreparedStatement undoPST,
ArrayList<Field> undoValues,
List<Field> pkValueList)
Undo prepare.
|
public static final boolean IS_UNDO_DATA_VALIDATION_ENABLE
protected SQLUndoLog sqlUndoLog
public AbstractUndoExecutor(SQLUndoLog sqlUndoLog)
sqlUndoLog - the sql undo logprotected abstract String buildUndoSQL()
public SQLUndoLog getSqlUndoLog()
public void executeOn(ConnectionProxy connectionProxy) throws SQLException
connectionProxy - the connection proxySQLException - the sql exceptionprotected void undoPrepare(PreparedStatement undoPST, ArrayList<Field> undoValues, List<Field> pkValueList) throws SQLException
undoPST - the undo pstundoValues - the undo valuespkValueList - the pk valueSQLException - the sql exceptionprotected abstract TableRecords getUndoRows()
protected boolean dataValidationAndGoOn(ConnectionProxy conn) throws SQLException
conn - the connSQLException - the sql exception such as has dirty dataprotected TableRecords queryCurrentRecords(ConnectionProxy connectionProxy) throws SQLException
connectionProxy - the connection proxySQLException - the sql exceptionprotected String buildCheckSql(String tableName, String whereCondition)
tableName - the tableName to querywhereCondition - the where conditionprotected List<Field> getOrderedPkList(TableRecords image, Row row, String dbType)
protected Map<String,List<Field>> parsePkValues(TableRecords records)
records - the recordsCopyright © 2024 Apache. All rights reserved.