|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Database-independent interface used to generate proprietary SQL locking statements based upon a pending standardized SQL DML statement.
Implementations should generate the appropriate locking statement(s) that will obtain database locks necessary to prevent blocking of a pending SQL statement.
All subclasses MUST have a public constructor with no parameters.
Field Summary | |
static DBLock |
EMPTY_LOCK
An immutable lock that contains no statements. |
static String |
TYPE_TABLE
|
static String |
TYPE_VIEW
|
Method Summary | |
void |
addListedColumn(String columnName)
Method for caller to supply columns that are listed as part of a pending SELECT, INSERT or UPDATE statement. |
void |
addPrimaryKeyColumn(String columnName)
Method for caller to supply table primary key info for the table referenced in the pending SQL statement. |
void |
addWhereColumn(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(String tableName,
String tableType)
Method for caller to supply table name and type info for the pending SQL statement. |
void |
setWhereClause(String whereClause)
Method for caller to supply the WHERE clause signature of the pending SELECT, UPDATE, or DELETE statement. |
Field Detail |
public static final DBLock EMPTY_LOCK
public static final String TYPE_TABLE
public static final String TYPE_VIEW
Method Detail |
public void setTable(String tableName, String tableType)
tableName
- will not be null
,
empty string, or whitespacetableType
- will be one of the TYPE
values
defined as part of this interfacepublic void addPrimaryKeyColumn(String columnName)
columnName
- will not be null
,
empty string, or whitespacepublic void addListedColumn(String columnName)
columnName
- will not be null
,
empty string, or whitespacepublic void addWhereColumn(String columnName)
columnName
- will not be null
,
empty string, or whitespacepublic void setWhereClause(String whereClause)
This should be appened as-is if the lock statement being generated requires a WHERE clause. The caller will set parameter values.
whereClause
- contains a single whitespace character
before the word WHERE; will not be null
,
empty string, or whitespacepublic DBLock generateSelectLock()
This method is currently not invoked in any rt. Its use is reserved for future use.
null
public DBLock generateInsertLock()
null
public DBLock generateUpdateLock()
null
public DBLock generateDeleteLock()
null
public void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |