@Translator(name="loopback", description="A translator for testing, that returns mock data") public class LoopbackExecutionFactory extends BaseDelegatingExecutionFactory
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteriaDEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE| Constructor and Description |
|---|
LoopbackExecutionFactory() |
| Modifier and Type | Method and Description |
|---|---|
Execution |
createExecution(Command command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
Object connection)
Create an execution object for the specified command
|
int |
getCharacterValuesSize() |
Object |
getConnection(Object factory)
Return a connection object from the given connection factory.
|
Object |
getConnection(Object factory,
ExecutionContext executionContext)
Return a connection object from the given connection factory.
|
String |
getDelegateName() |
boolean |
getIncrementRows() |
void |
getMetadata(MetadataFactory metadataFactory,
Object conn)
Implement to provide metadata to the metadata for use by the engine.
|
long |
getPollIntervalInMilli() |
int |
getRowCount() |
int |
getWaitTime() |
boolean |
isSourceRequired()
Flag that indicates if a underlying source connection required for this execution factory to work
|
boolean |
isSourceRequiredForMetadata()
Flag that indicates if a underlying source connection required for this execution factory to return metadata
|
boolean |
isThrowError() |
void |
setCharacterValuesSize(int charValSize) |
void |
setIncrementRows(boolean incrementRows) |
void |
setPollIntervalInMilli(long intervel) |
void |
setRowCount(int rowCount) |
void |
setThrowError(boolean error) |
void |
setWaitTime(int waitTime) |
void |
start()
Initialize the connector with supplied configuration
|
areLobsUsableAfterClose, closeConnection, createDirectExecution, createProcedureExecution, createResultSetExecution, createUpdateExecution, equals, getCacheDirective, getDefaultNullOrder, getDelegate, getDirectQueryProcedureName, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getPushDownFunctions, getSupportedFunctions, getSupportedJoinCriteria, getTypeFacility, hashCode, initCapabilities, isCopyLobs, isForkable, isImmutable, isSourceRequiredForCapabilities, isThreadBound, requiresCriteria, setDelegate, setDelegateName, supportsAdvancedOlapOperations, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesEnhancedNumeric, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsArrayAgg, supportsArrayType, supportsBatchedUpdates, supportsBulkUpdate, supportsCommonTableExpressions, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsConvert, supportsCorrelatedSubqueries, supportsDependentJoins, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsExistsCriteria, supportsFormatLiteral, supportsFullDependentJoins, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGroupBy, supportsGroupByRollup, supportsHaving, supportsInCriteria, supportsInCriteriaSubquery, supportsInlineViews, supportsInnerJoins, supportsInsertWithQueryExpression, supportsIntersect, supportsIsNullCriteria, supportsLikeCriteria, supportsLikeCriteriaEscapeCharacter, supportsLikeRegex, supportsNotCriteria, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLiteralComparison, supportsOnlySingleTableGroupBy, supportsOrCriteria, supportsOrderBy, supportsOrderByNullOrdering, supportsOrderByUnrelated, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsRowLimit, supportsRowOffset, supportsScalarSubqueries, supportsSearchedCaseExpressions, supportsSelectDistinct, supportsSelectExpression, supportsSelectWithoutFrom, supportsSelfJoins, supportsSetQueryOrderBy, supportsSimilarTo, supportsStringAgg, supportsSubqueryInOn, supportsUnions, supportsWindowDistinctAggregates, supportsWindowOrderByWithAggregates, toString, useAnsiJoinaddPushDownFunction, getInstance, getNativeQueryProcedureName, setCopyLobs, setDirectQueryProcedureName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, supportsNativeQueriespublic void start()
throws TranslatorException
ExecutionFactorystart in class ExecutionFactoryTranslatorException@TranslatorProperty(display="Size of values for CLOB, VARCHAR, etc.", advanced=true) public int getCharacterValuesSize()
public void setCharacterValuesSize(int charValSize)
@TranslatorProperty(display="If set to true each value in each column is being incremented with each row", advanced=true) public boolean getIncrementRows()
public void setIncrementRows(boolean incrementRows)
public Object getConnection(Object factory) throws TranslatorException
ExecutionFactoryConnectionFactory. Subclasses should override, if they use
another type of connection factory.getConnection in class ExecutionFactoryTranslatorExceptionExecutionFactory.getConnection(Object, ExecutionContext)public Object getConnection(Object factory, ExecutionContext executionContext) throws TranslatorException
ExecutionFactoryConnectionFactory. Subclasses should override, if they use
another type of connection factory or wish to use the ExecutionContext. By default calls ExecutionFactory.getConnection(Object)getConnection in class BaseDelegatingExecutionFactoryexecutionContext - null if this is a system request for a connectionTranslatorException@TranslatorProperty(display="Max Random Wait Time", advanced=true) public int getWaitTime()
public void setWaitTime(int waitTime)
@TranslatorProperty(display="Rows Per Query", advanced=true) public int getRowCount()
public void setRowCount(int rowCount)
@TranslatorProperty(display="Always Throw Error") public boolean isThrowError()
public void setThrowError(boolean error)
@TranslatorProperty(display="Poll interval if using a Asynchronous Connector") public long getPollIntervalInMilli()
public void setPollIntervalInMilli(long intervel)
public Execution createExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws TranslatorException
ExecutionFactorycreateExecution in class ExecutionFactorycommand - the commandexecutionContext - Provides information about the context that this command is
executing within, such as the identifiers for the command being executedmetadata - Access to runtime metadata if needed to translate the commandconnection - connection factory object to the data sourceTranslatorExceptionpublic boolean isSourceRequired()
ExecutionFactoryisSourceRequired in class BaseDelegatingExecutionFactorypublic boolean isSourceRequiredForMetadata()
ExecutionFactoryisSourceRequiredForMetadata in class BaseDelegatingExecutionFactorypublic void getMetadata(MetadataFactory metadataFactory, Object conn) throws TranslatorException
ExecutionFactorygetMetadata in class BaseDelegatingExecutionFactoryconn - may be null if the source is not requiredTranslatorException - to indicate a recoverable error, otherwise a RuntimeExceptionExecutionFactory.isSourceRequiredForMetadata()@TranslatorProperty(display="Delegate name", required=false) public String getDelegateName()
getDelegateName in interface DelegatingExecutionFactorygetDelegateName in class BaseDelegatingExecutionFactoryCopyright © 2013 JBoss by Red Hat. All Rights Reserved.