com.metamatrix.query.util
Class CommandContext

java.lang.Object
  extended by com.metamatrix.query.util.CommandContext
All Implemented Interfaces:
java.lang.Cloneable

public class CommandContext
extends java.lang.Object
implements java.lang.Cloneable

Defines the context that a command is processing in. For example, this defines who is processing the command and why. Also, this class (or subclasses) provide a means to pass context-specific information between users of the query processor framework.


Constructor Summary
  CommandContext()
           
protected CommandContext(CommandContext context)
           
  CommandContext(java.lang.Object processorID, java.lang.String connectionID, java.lang.String userName, java.io.Serializable commandPayload, java.lang.String vdbName, java.lang.String vdbVersion, java.util.Properties envProperties, boolean processDebug, boolean collectNodeStatistics)
          Construct a new context.
  CommandContext(java.lang.Object processorID, java.lang.String connectionID, java.lang.String userName, java.lang.String vdbName, java.lang.String vdbVersion)
          Construct a new context.
 
Method Summary
 java.lang.Object clone()
           
 int getCallStackDepth()
           
 boolean getCollectNodeStatistics()
           
 java.io.Serializable getCommandPayload()
           
 java.lang.String getConnectionID()
           
 int getConnectorBatchSize()
           
 java.util.Properties getEnvironmentProperties()
           
 java.lang.Object getFromContext(Expression expression)
           
 double getNextRand()
           
 double getNextRand(long seed)
           
 PlanToProcessConverter getPlanToProcessConverter()
           
 boolean getProcessDebug()
           
 int getProcessorBatchSize()
           
 java.lang.Object getProcessorID()
           
 QueryProcessor.ProcessorFactory getQueryProcessorFactory()
           
 SecurityFunctionEvaluator getSecurityFunctionEvaluator()
           
 java.util.TimeZone getServerTimeZone()
           
 int getStreamingBatchSize()
           
 java.lang.Object getTempTableStore()
           
 java.lang.String getUserName()
           
 VariableContext getVariableContext()
           
 java.lang.String getVdbName()
           
 java.lang.String getVdbVersion()
           
 boolean isOptimisticTransaction()
           
 boolean isSessionFunctionEvaluated()
           
 void popCall()
           
 void pushCall(java.lang.String value)
           
 void pushVariableContext(VariableContext toPush)
           
 void setCollectNodeStatistics(boolean collectNodeStatistics)
           
 void setCommandPayload(java.io.Serializable commandPayload)
           
 void setConnectionID(java.lang.String connectionID)
          Sets the connectionID.
 void setConnectorBatchSize(int connectorBatchSize)
           
 void setEnvironmentProperties(java.util.Properties properties)
           
 void setOptimisticTransaction(boolean optimisticTransaction)
           
 void setPlanToProcessConverter(PlanToProcessConverter planToProcessConverter)
           
 void setProcessDebug(boolean processDebug)
           
 void setProcessorBatchSize(int processorBatchSize)
           
 void setProcessorID(java.lang.Object object)
           
 void setQueryProcessorFactory(QueryProcessor.ProcessorFactory queryProcessorFactory)
           
 void setSecurityFunctionEvaluator(SecurityFunctionEvaluator securityFunctionEvaluator)
           
 void setSessionFunctionEvaluated(boolean sessionFunctionEvaluated)
           
 void setStreamingBatchSize(int streamingBatchSize)
           
 void setTempTableStore(java.lang.Object tempTableStore)
           
 void setUserName(java.lang.String userName)
          Sets the userName.
 void setVariableContext(VariableContext variableContext)
           
 void setVdbName(java.lang.String vdbName)
          Sets the vdbName.
 void setVdbVersion(java.lang.String vdbVersion)
          Sets the vdbVersion.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandContext

public CommandContext(java.lang.Object processorID,
                      java.lang.String connectionID,
                      java.lang.String userName,
                      java.io.Serializable commandPayload,
                      java.lang.String vdbName,
                      java.lang.String vdbVersion,
                      java.util.Properties envProperties,
                      boolean processDebug,
                      boolean collectNodeStatistics)
Construct a new context.

Parameters:
collectNodeStatistics - TODO

CommandContext

public CommandContext(java.lang.Object processorID,
                      java.lang.String connectionID,
                      java.lang.String userName,
                      java.lang.String vdbName,
                      java.lang.String vdbVersion)
Construct a new context.


CommandContext

protected CommandContext(CommandContext context)

CommandContext

public CommandContext()
Method Detail

isSessionFunctionEvaluated

public boolean isSessionFunctionEvaluated()

setSessionFunctionEvaluated

public void setSessionFunctionEvaluated(boolean sessionFunctionEvaluated)

getProcessorID

public java.lang.Object getProcessorID()
Returns:

getProcessDebug

public boolean getProcessDebug()

setProcessDebug

public void setProcessDebug(boolean processDebug)

setProcessorID

public void setProcessorID(java.lang.Object object)
Parameters:
object -

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getConnectionID

public java.lang.String getConnectionID()
Returns:
String

getUserName

public java.lang.String getUserName()
Returns:
String

getVdbName

public java.lang.String getVdbName()
Returns:
String

getVdbVersion

public java.lang.String getVdbVersion()
Returns:
String

setConnectionID

public void setConnectionID(java.lang.String connectionID)
Sets the connectionID.

Parameters:
connectionID - The connectionID to set

setUserName

public void setUserName(java.lang.String userName)
Sets the userName.

Parameters:
userName - The userName to set

setVdbName

public void setVdbName(java.lang.String vdbName)
Sets the vdbName.

Parameters:
vdbName - The vdbName to set

setVdbVersion

public void setVdbVersion(java.lang.String vdbVersion)
Sets the vdbVersion.

Parameters:
vdbVersion - The vdbVersion to set

getEnvironmentProperties

public java.util.Properties getEnvironmentProperties()

setEnvironmentProperties

public void setEnvironmentProperties(java.util.Properties properties)

getCommandPayload

public java.io.Serializable getCommandPayload()

setCommandPayload

public void setCommandPayload(java.io.Serializable commandPayload)

setCollectNodeStatistics

public void setCollectNodeStatistics(boolean collectNodeStatistics)
Parameters:
collectNodeStatistics - The collectNodeStatistics to set.
Since:
4.2

getCollectNodeStatistics

public boolean getCollectNodeStatistics()

getStreamingBatchSize

public int getStreamingBatchSize()

setStreamingBatchSize

public void setStreamingBatchSize(int streamingBatchSize)

getConnectorBatchSize

public int getConnectorBatchSize()

setConnectorBatchSize

public void setConnectorBatchSize(int connectorBatchSize)

getProcessorBatchSize

public int getProcessorBatchSize()

setProcessorBatchSize

public void setProcessorBatchSize(int processorBatchSize)

getNextRand

public double getNextRand()

getNextRand

public double getNextRand(long seed)

pushCall

public void pushCall(java.lang.String value)
              throws QueryProcessingException
Throws:
QueryProcessingException

getCallStackDepth

public int getCallStackDepth()

popCall

public void popCall()

setOptimisticTransaction

public void setOptimisticTransaction(boolean optimisticTransaction)
Parameters:
optimisticTransaction - The optimisticTransaction to set.

isOptimisticTransaction

public boolean isOptimisticTransaction()
Returns:
Returns the optimisticTransaction.

getSecurityFunctionEvaluator

public SecurityFunctionEvaluator getSecurityFunctionEvaluator()
Returns:
Returns the securityFunctionEvaluator.

setSecurityFunctionEvaluator

public void setSecurityFunctionEvaluator(SecurityFunctionEvaluator securityFunctionEvaluator)
Parameters:
securityFunctionEvaluator - The securityFunctionEvaluator to set.

getTempTableStore

public java.lang.Object getTempTableStore()

setTempTableStore

public void setTempTableStore(java.lang.Object tempTableStore)

getServerTimeZone

public java.util.TimeZone getServerTimeZone()

setPlanToProcessConverter

public void setPlanToProcessConverter(PlanToProcessConverter planToProcessConverter)

getPlanToProcessConverter

public PlanToProcessConverter getPlanToProcessConverter()

getQueryProcessorFactory

public QueryProcessor.ProcessorFactory getQueryProcessorFactory()

setQueryProcessorFactory

public void setQueryProcessorFactory(QueryProcessor.ProcessorFactory queryProcessorFactory)

getVariableContext

public VariableContext getVariableContext()

setVariableContext

public void setVariableContext(VariableContext variableContext)

pushVariableContext

public void pushVariableContext(VariableContext toPush)

getFromContext

public java.lang.Object getFromContext(Expression expression)
                                throws MetaMatrixComponentException
Throws:
MetaMatrixComponentException


Copyright © 2009. All Rights Reserved.