com.novell.nds.dirxml.driver.jdbc.db.lock
Class DBLock

java.lang.Object
  extended bycom.novell.nds.dirxml.driver.jdbc.db.lock.DBLock
Direct Known Subclasses:
DBImmutableLock

public class DBLock
extends Object

A mutable database resource lock. Consists of zero or more database-native SQL statements that lock a database resource.


Constructor Summary
DBLock()
          Instantiates a database lock of zero statements.
 
Method Summary
 void addLockStatement(DBLockStatement stmt)
          Adds a statement to this lock.
 List getLockStatements()
          Retruns the SQL statements that comprise this lock.
 boolean shouldSubstitute()
          Method indicating to the caller whether this lock's statements should replace the ones that generated them.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBLock

public DBLock()
Instantiates a database lock of zero statements.

Method Detail

addLockStatement

public void addLockStatement(DBLockStatement stmt)
Adds a statement to this lock.

Parameters:
stmt - may be null

getLockStatements

public List getLockStatements()
Retruns the SQL statements that comprise this lock.

Returns:
a list of zero or more DBLockStatement objects; will not return null

shouldSubstitute

public boolean shouldSubstitute()
Method indicating to the caller whether this lock's statements should replace the ones that generated them. Some of the locking statements that might be used prior to a SELECT statement, for instance, are effectively equivalent to the original.

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

Returns:
true if this lock's statements should be executed instead of the statements used to generate them; false otherwise