Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.nds.dirxml.driver.jdbc.db.lock
Class DBLockGenerator

    java.lang.Object
      com.novell.nds.dirxml.driver.jdbc.db.lock.DBLockGenerator

All Implemented Interfaces:
  DBLockStatementGenerator

Direct Known Subclasses:
  OraLockGenerator

public class DBLockGenerator
extends Object
implements DBLockStatementGenerator

Default implementation of interface `DBLockStatementGenerator`.

See Also:
  `DBLockStatementGenerator`

Field Summary

Fields inherited from interface com.novell.nds.dirxml.driver.jdbc.db.lock.DBLockStatementGenerator
`EMPTY_LOCK, TYPE_TABLE, TYPE_VIEW`

Constructor Summary
`DBLockGenerator()`

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.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DBLockGenerator

    public DBLockGenerator()

Method Detail

### setTable

    public void setTable(String tableName,
                         String tableType)

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to supply table name and type info for the pending SQL statement.

  Specified by:
    `setTable` in interface `DBLockStatementGenerator`
  Parameters:
    `tableName` - will not be `null`, empty string, or whitespace
    `tableType` - will be one of the `TYPE` values defined as part of this interface

### addWhereColumn

    public void addWhereColumn(String columnName)

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to supply columns that are listed as part of the WHERE clause for a pending SELECT, UPDATE, or DELETE statement.

  Specified by:
    `addWhereColumn` in interface `DBLockStatementGenerator`
  Parameters:
    `columnName` - will not be `null`, empty string, or whitespace

### addPrimaryKeyColumn

    public void addPrimaryKeyColumn(String columnName)

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to supply table primary key info for the table referenced in the pending SQL statement.

  Specified by:
    `addPrimaryKeyColumn` in interface `DBLockStatementGenerator`
  Parameters:
    `columnName` - will not be `null`, empty string, or whitespace

### addListedColumn

    public void addListedColumn(String columnName)

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to supply columns that are listed as part of a pending SELECT, INSERT or UPDATE statement.

  Specified by:
    `addListedColumn` in interface `DBLockStatementGenerator`
  Parameters:
    `columnName` - will not be `null`, empty string, or whitespace

### setWhereClause

    public void setWhereClause(String whereClause)

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to supply the WHERE clause signature of the pending SELECT, UPDATE, or DELETE statement.

  This should be appened as-is if the lock statement being generated requires a WHERE clause. The caller will set parameter values.

  Specified by:
    `setWhereClause` in interface `DBLockStatementGenerator`
  Parameters:
    `whereClause` - contains a single whitespace character before the word WHERE; will not be `null`, empty string, or whitespace

### generateSelectLock

    public DBLock generateSelectLock()

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to request the appropriate database lock for a pending SELECT statement.

  This method is currently not invoked in any rt. Its use is reserved for future use.

  Specified by:
    `generateSelectLock` in interface `DBLockStatementGenerator`
  Returns:
    should not return `null`

### generateInsertLock

    public DBLock generateInsertLock()

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to request the appropriate database lock for a pending INSERT statement.

  Specified by:
    `generateInsertLock` in interface `DBLockStatementGenerator`
  Returns:
    should not return `null`

### generateUpdateLock

    public DBLock generateUpdateLock()

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to request the appropriate database lock for a pending UPDATE statement.

  Specified by:
    `generateUpdateLock` in interface `DBLockStatementGenerator`
  Returns:
    should not return `null`

### generateDeleteLock

    public DBLock generateDeleteLock()

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to request the appropriate database lock for a pending DELETE statement.

  Specified by:
    `generateDeleteLock` in interface `DBLockStatementGenerator`
  Returns:
    should not return `null`

### reset

    public void reset()

  Description copied from interface: `DBLockStatementGenerator`
  Method for caller to reset the state of this generator for use with another pending SQL statement.

  Specified by:
    `reset` in interface `DBLockStatementGenerator`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD