Package org.teiid.dqp.internal.process
Class Request
- java.lang.Object
-
- org.teiid.dqp.internal.process.Request
-
- Direct Known Subclasses:
PreparedStatementRequest
public class Request extends Object
Server side representation of the RequestMessage. Knows how to process itself.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanaddedLimitprotected AnalysisRecordanalysisRecordprotected CapabilitiesFindercapabilitiesFinderprotected ConnectorManagerRepositoryconnectorManagerRepoprotected CommandContextcontextprotected ExplainCommandexplainCommandprotected IDGeneratoridGeneratorprotected QueryMetadataInterfacemetadataprotected Optionsoptionsprotected PreParserpreParserprotected QueryProcessorprocessorprotected ProcessorPlanprocessPlanprotected RequestMessagerequestMsgprotected booleanreturnsUpdateCountprotected TransactionContexttransactionContextprotected CommanduserCommand
-
Constructor Summary
Constructors Constructor Description Request()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckReferences(List<Reference> references)protected voidcreateCommandContext()static ParseInfocreateParseInfo(RequestMessage requestMsg, SessionMetadata sessionMetadata)protected voidgeneratePlan(boolean prepared)state side effects: creates the analysis record creates the command context sets the pre-rewrite command on the request adds a limit clause if the row limit is specified sets the processor planprotected voidinitMetadata()if the metadata has not been supplied via setMetadata, this method will create the appropriate statebooleanisReturingParams()voidprocessRequest()protected voidresolveCommand(Command command)voidsetAuthorizationValidator(AuthorizationValidator authorizationValidator)voidsetExecutor(Executor executor)voidsetOptions(Options options)voidsetPreParser(PreParser preParser)voidsetResultSetCacheEnabled(boolean resultSetCacheEnabled)voidsetUserRequestConcurrency(int userRequestConcurrency)protected booleanvalidateAccess(String[] commandStr, Command command, AuthorizationValidator.CommandType type)static voidvalidateWithVisitor(AbstractValidationVisitor visitor, QueryMetadataInterface metadata, Command command)
-
-
-
Field Detail
-
requestMsg
protected RequestMessage requestMsg
-
idGenerator
protected IDGenerator idGenerator
-
capabilitiesFinder
protected CapabilitiesFinder capabilitiesFinder
-
metadata
protected QueryMetadataInterface metadata
-
addedLimit
protected boolean addedLimit
-
processPlan
protected ProcessorPlan processPlan
-
analysisRecord
protected AnalysisRecord analysisRecord
-
context
protected CommandContext context
-
processor
protected QueryProcessor processor
-
transactionContext
protected TransactionContext transactionContext
-
connectorManagerRepo
protected ConnectorManagerRepository connectorManagerRepo
-
userCommand
protected Command userCommand
-
explainCommand
protected ExplainCommand explainCommand
-
returnsUpdateCount
protected boolean returnsUpdateCount
-
options
protected Options options
-
preParser
protected PreParser preParser
-
-
Method Detail
-
setOptions
public void setOptions(Options options)
-
setResultSetCacheEnabled
public void setResultSetCacheEnabled(boolean resultSetCacheEnabled)
-
setAuthorizationValidator
public void setAuthorizationValidator(AuthorizationValidator authorizationValidator)
-
initMetadata
protected void initMetadata() throws TeiidComponentExceptionif the metadata has not been supplied via setMetadata, this method will create the appropriate state- Throws:
TeiidComponentException
-
createCommandContext
protected void createCommandContext()
-
setUserRequestConcurrency
public void setUserRequestConcurrency(int userRequestConcurrency)
-
checkReferences
protected void checkReferences(List<Reference> references) throws QueryValidatorException
- Throws:
QueryValidatorException
-
resolveCommand
protected void resolveCommand(Command command) throws QueryResolverException, TeiidComponentException
-
createParseInfo
public static ParseInfo createParseInfo(RequestMessage requestMsg, SessionMetadata sessionMetadata)
-
validateWithVisitor
public static void validateWithVisitor(AbstractValidationVisitor visitor, QueryMetadataInterface metadata, Command command) throws QueryValidatorException, TeiidComponentException
-
generatePlan
protected void generatePlan(boolean prepared) throws TeiidComponentException, TeiidProcessingExceptionstate side effects: creates the analysis record creates the command context sets the pre-rewrite command on the request adds a limit clause if the row limit is specified sets the processor plan
-
processRequest
public void processRequest() throws TeiidComponentException, TeiidProcessingException
-
validateAccess
protected boolean validateAccess(String[] commandStr, Command command, AuthorizationValidator.CommandType type) throws QueryValidatorException, TeiidComponentException
-
setExecutor
public void setExecutor(Executor executor)
-
isReturingParams
public boolean isReturingParams()
-
setPreParser
public void setPreParser(PreParser preParser)
-
-