public class DBLockGenerator extends java.lang.Object implements DBLockStatementGenerator
DBLockStatementGenerator
.DBLockStatementGenerator
EMPTY_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)
DBLockStatementGenerator
setTable
in interface DBLockStatementGenerator
tableName
- 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)
DBLockStatementGenerator
addWhereColumn
in interface DBLockStatementGenerator
columnName
- will not be null
,
empty string, or whitespacepublic void addPrimaryKeyColumn(java.lang.String columnName)
DBLockStatementGenerator
addPrimaryKeyColumn
in interface DBLockStatementGenerator
columnName
- will not be null
,
empty string, or whitespacepublic void addListedColumn(java.lang.String columnName)
DBLockStatementGenerator
addListedColumn
in interface DBLockStatementGenerator
columnName
- will not be null
,
empty string, or whitespacepublic void setWhereClause(java.lang.String whereClause)
DBLockStatementGenerator
This should be appened as-is if the lock statement being generated requires a WHERE clause. The caller will set parameter values.
setWhereClause
in interface DBLockStatementGenerator
whereClause
- contains a single whitespace character
before the word WHERE; will not be null
,
empty string, or whitespacepublic DBLock generateSelectLock()
DBLockStatementGenerator
This method is currently not invoked in any rt. Its use is reserved for future use.
generateSelectLock
in interface DBLockStatementGenerator
null
public DBLock generateInsertLock()
DBLockStatementGenerator
generateInsertLock
in interface DBLockStatementGenerator
null
public DBLock generateUpdateLock()
DBLockStatementGenerator
generateUpdateLock
in interface DBLockStatementGenerator
null
public DBLock generateDeleteLock()
DBLockStatementGenerator
generateDeleteLock
in interface DBLockStatementGenerator
null
public void reset()
DBLockStatementGenerator
reset
in interface DBLockStatementGenerator