org.apache.derby.impl.sql.compile
Class LockTableNode

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.QueryTreeNode
      extended byorg.apache.derby.impl.sql.compile.StatementNode
          extended byorg.apache.derby.impl.sql.compile.MiscellaneousStatementNode
              extended byorg.apache.derby.impl.sql.compile.LockTableNode
All Implemented Interfaces:
Visitable

public class LockTableNode
extends MiscellaneousStatementNode

A LockTableNode is the root of a QueryTree that represents a LOCK TABLE command: LOCK TABLE IN SHARE/EXCLUSIVE MODE

Author:
Jerry Brenner

Field Summary
private  long conglomerateNumber
           
private  boolean exclusiveMode
           
private  TableDescriptor lockTableDescriptor
           
private  TableName tableName
           
 
Fields inherited from class org.apache.derby.impl.sql.compile.StatementNode
NEED_CURSOR_ACTIVATION, NEED_DDL_ACTIVATION, NEED_NOTHING_ACTIVATION, NEED_PARAM_ACTIVATION, NEED_ROW_ACTIVATION
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset
 
Constructor Summary
LockTableNode()
           
 
Method Summary
 QueryTreeNode bind()
          Bind this LockTableNode.
 void init(java.lang.Object tableName, java.lang.Object exclusiveMode)
          Initializer for LockTableNode
 ConstantAction makeConstantAction()
          Create the Constant information that will drive the guts of Execution.
 boolean referencesSessionSchema()
          Return true if the node references SESSION schema tables (temporary or permanent)
 java.lang.String statementToString()
           
 java.lang.String toString()
          Convert this object to a String.
 
Methods inherited from class org.apache.derby.impl.sql.compile.MiscellaneousStatementNode
activationKind, generate, needsSavepoint
 
Methods inherited from class org.apache.derby.impl.sql.compile.StatementNode
generate, isAtomic, lockTableForCompilation
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, convertDefaultNode, debugFlush, debugPrint, executeSchemaName, executeStatementName, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getSPSName, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, isSessionSchema, isSessionSchema, makeResultDescription, makeTableName, nodeHeader, optimize, parseQueryText, printLabel, printSubNodes, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tableName

private TableName tableName

exclusiveMode

private boolean exclusiveMode

conglomerateNumber

private long conglomerateNumber

lockTableDescriptor

private TableDescriptor lockTableDescriptor
Constructor Detail

LockTableNode

public LockTableNode()
Method Detail

init

public void init(java.lang.Object tableName,
                 java.lang.Object exclusiveMode)
Initializer for LockTableNode

Overrides:
init in class QueryTreeNode
Parameters:
tableName - The table to lock
exclusiveMode - boolean, whether or not to get an exclusive lock.

toString

public java.lang.String toString()
Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.

Overrides:
toString in class StatementNode
Returns:
This object as a String

statementToString

public java.lang.String statementToString()
Specified by:
statementToString in class StatementNode

bind

public QueryTreeNode bind()
                   throws StandardException
Bind this LockTableNode. This means looking up the table, verifying it exists and getting the heap conglomerate number.

Overrides:
bind in class QueryTreeNode
Returns:
The bound query tree
Throws:
StandardException - Thrown on error

referencesSessionSchema

public boolean referencesSessionSchema()
                                throws StandardException
Return true if the node references SESSION schema tables (temporary or permanent)

Overrides:
referencesSessionSchema in class QueryTreeNode
Returns:
true if references SESSION schema tables, else false
Throws:
StandardException - Thrown on error

makeConstantAction

public ConstantAction makeConstantAction()
                                  throws StandardException
Create the Constant information that will drive the guts of Execution.

Overrides:
makeConstantAction in class QueryTreeNode
Throws:
StandardException - Thrown on failure

Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.