public class DBLockGenerator extends java.lang.Object implements DBLockStatementGenerator
DBLockStatementGenerator.DBLockStatementGeneratorEMPTY_LOCK, TYPE_TABLE, TYPE_VIEW| Constructor and Description |
|---|
DBLockGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListedColumn(java.lang.String columnName)
Method for caller to supply columns that are listed
as part of a pending SELECT, INSERT or UPDATE statement.
|
void |
addPrimaryKeyColumn(java.lang.String columnName)
Method for caller to supply table primary key info
for the table referenced in the pending SQL statement.
|
void |
addWhereColumn(java.lang.String columnName)
Method for caller to supply columns that are listed
as part of the WHERE clause for a pending SELECT,
UPDATE, or DELETE statement.
|
DBLock |
generateDeleteLock()
Method for caller to request the appropriate database
lock for a pending DELETE statement.
|
DBLock |
generateInsertLock()
Method for caller to request the appropriate database
lock for a pending INSERT statement.
|
DBLock |
generateSelectLock()
Method for caller to request the appropriate database
lock for a pending SELECT statement.
|
DBLock |
generateUpdateLock()
Method for caller to request the appropriate database
lock for a pending UPDATE statement.
|
void |
reset()
Method for caller to reset the state of this
generator for use with another pending SQL statement.
|
void |
setTable(java.lang.String tableName,
java.lang.String tableType)
Method for caller to supply table name and type info
for the pending SQL statement.
|
void |
setWhereClause(java.lang.String whereClause)
Method for caller to supply the WHERE clause signature
of the pending SELECT, UPDATE, or DELETE statement.
|
public void setTable(java.lang.String tableName,
java.lang.String tableType)
DBLockStatementGeneratorsetTable in interface DBLockStatementGeneratortableName - will not be null,
empty string, or whitespacetableType - will be one of the TYPE values
defined as part of this interfacepublic void addWhereColumn(java.lang.String columnName)
DBLockStatementGeneratoraddWhereColumn in interface DBLockStatementGeneratorcolumnName - will not be null,
empty string, or whitespacepublic void addPrimaryKeyColumn(java.lang.String columnName)
DBLockStatementGeneratoraddPrimaryKeyColumn in interface DBLockStatementGeneratorcolumnName - will not be null,
empty string, or whitespacepublic void addListedColumn(java.lang.String columnName)
DBLockStatementGeneratoraddListedColumn in interface DBLockStatementGeneratorcolumnName - will not be null,
empty string, or whitespacepublic void setWhereClause(java.lang.String whereClause)
DBLockStatementGeneratorThis should be appened as-is if the lock statement being generated requires a WHERE clause. The caller will set parameter values.
setWhereClause in interface DBLockStatementGeneratorwhereClause - contains a single whitespace character
before the word WHERE; will not be null,
empty string, or whitespacepublic DBLock generateSelectLock()
DBLockStatementGeneratorThis method is currently not invoked in any rt. Its use is reserved for future use.
generateSelectLock in interface DBLockStatementGeneratornullpublic DBLock generateInsertLock()
DBLockStatementGeneratorgenerateInsertLock in interface DBLockStatementGeneratornullpublic DBLock generateUpdateLock()
DBLockStatementGeneratorgenerateUpdateLock in interface DBLockStatementGeneratornullpublic DBLock generateDeleteLock()
DBLockStatementGeneratorgenerateDeleteLock in interface DBLockStatementGeneratornullpublic void reset()
DBLockStatementGeneratorreset in interface DBLockStatementGenerator