Package org.teiid.translator.file
Class FileExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<ConnectionFactory,VirtualFileConnection>
-
- org.teiid.translator.file.FileExecutionFactory
-
@Translator(name="file", description="File Translator, reads contents of files or writes to them") public class FileExecutionFactory extends ExecutionFactory<ConnectionFactory,VirtualFileConnection>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport
-
-
Field Summary
Fields Modifier and Type Field Description static String
DELETEFILE
static String
GETFILES
static String
GETTEXTFILES
static String
SAVEFILE
static BundleUtil
UTIL
-
Fields inherited from class org.teiid.translator.ExecutionFactory
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description FileExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areLobsUsableAfterClose()
Indicates if LOBs are usable after the execution is closed.ProcedureExecution
createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, VirtualFileConnection conn)
String
getEncoding()
void
getMetadata(MetadataFactory metadataFactory, VirtualFileConnection connection)
Implement to provide metadata to the metadata for use by the engine.void
initCapabilities(VirtualFileConnection connection)
Will be called byExecutionFactory.start()
with a null connection if a source connection is notExecutionFactory.isSourceRequiredForCapabilities()
boolean
isExceptionIfFileNotFound()
boolean
isSourceRequiredForCapabilities()
If true, theExecutionFactory.initCapabilities(Object)
method will be consulted prior to determining the capabilitiesvoid
setEncoding(String encoding)
void
setExceptionIfFileNotFound(boolean exceptionIfFileNotFound)
-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, closeConnection, createDirectExecution, createExecution, createResultSetExecution, createUpdateExecution, getCacheDirective, getCollationLocale, getConnection, getConnection, getDefaultNullOrder, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getMetadataProcessor, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedFunctions, getSupportedJoinCriteria, getTransactionSupport, getTypeFacility, isCopyLobs, isForkable, isImmutable, isSourceRequired, isSourceRequiredForMetadata, isThreadBound, requiresCriteria, returnsSingleUpdateCount, setCollationLocale, setCopyLobs, setDirectQueryProcedureName, setExcludedCommonTableExpressionName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, setTransactionSupport, start, supportsAdvancedOlapOperations, supportsAggregatesAvg, supportsAggregatesCount, supportsAggregatesCountBig, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesEnhancedNumeric, supportsAggregatesMax, supportsAggregatesMin, supportsAggregatesSum, supportsAliasedTable, supportsArrayAgg, supportsArrayType, supportsBatchedUpdates, supportsBulkUpdate, supportsCommonTableExpressions, supportsCompareCriteriaEquals, supportsCompareCriteriaOrdered, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueries, supportsCorrelatedSubqueryLimit, supportsDependentJoins, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsExistsCriteria, supportsFormatLiteral, supportsFullDependentJoins, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupBy, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsHaving, supportsInCriteria, supportsInCriteriaSubquery, supportsInlineViews, supportsInnerJoins, supportsInsertWithQueryExpression, supportsIntersect, supportsIsDistinctCriteria, supportsIsNullCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeCriteria, supportsLikeCriteriaEscapeCharacter, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsNotCriteria, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrCriteria, supportsOrderBy, supportsOrderByNullOrdering, supportsOrderByUnrelated, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureParameterExpression, supportsProcedureTable, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsRecursiveCommonTableExpressions, supportsRowLimit, supportsRowOffset, supportsScalarSubqueries, supportsScalarSubqueryProjection, supportsSearchedCaseExpressions, supportsSelectDistinct, supportsSelectExpression, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSelfJoins, supportsSetQueryLimitOffset, supportsSetQueryOrderBy, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUnions, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoin, useBindingsForDependentJoin
-
-
-
-
Field Detail
-
UTIL
public static BundleUtil UTIL
-
GETTEXTFILES
public static final String GETTEXTFILES
- See Also:
- Constant Field Values
-
GETFILES
public static final String GETFILES
- See Also:
- Constant Field Values
-
SAVEFILE
public static final String SAVEFILE
- See Also:
- Constant Field Values
-
DELETEFILE
public static final String DELETEFILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEncoding
@TranslatorProperty(display="File Encoding", advanced=true) public String getEncoding()
-
setEncoding
public void setEncoding(String encoding)
-
isExceptionIfFileNotFound
@TranslatorProperty(display="Exception if file not found", advanced=true) public boolean isExceptionIfFileNotFound()
-
setExceptionIfFileNotFound
public void setExceptionIfFileNotFound(boolean exceptionIfFileNotFound)
-
createProcedureExecution
public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, VirtualFileConnection conn) throws TranslatorException
- Overrides:
createProcedureExecution
in classExecutionFactory<ConnectionFactory,VirtualFileConnection>
- Throws:
TranslatorException
-
getMetadata
public void getMetadata(MetadataFactory metadataFactory, VirtualFileConnection connection) throws TranslatorException
Description copied from class:ExecutionFactory
Implement to provide metadata to the metadata for use by the engine. This is the primary method of creating metadata for dynamic VDBs.- Overrides:
getMetadata
in classExecutionFactory<ConnectionFactory,VirtualFileConnection>
connection
- may be null if the source is not required- Throws:
TranslatorException
- to indicate a recoverable error, otherwise a RuntimeException- See Also:
ExecutionFactory.isSourceRequiredForMetadata()
-
isSourceRequiredForCapabilities
public boolean isSourceRequiredForCapabilities()
Description copied from class:ExecutionFactory
If true, theExecutionFactory.initCapabilities(Object)
method will be consulted prior to determining the capabilities- Overrides:
isSourceRequiredForCapabilities
in classExecutionFactory<ConnectionFactory,VirtualFileConnection>
- Returns:
-
initCapabilities
public void initCapabilities(VirtualFileConnection connection) throws TranslatorException
Description copied from class:ExecutionFactory
Will be called byExecutionFactory.start()
with a null connection if a source connection is notExecutionFactory.isSourceRequiredForCapabilities()
- Overrides:
initCapabilities
in classExecutionFactory<ConnectionFactory,VirtualFileConnection>
- Throws:
TranslatorException
-
areLobsUsableAfterClose
public boolean areLobsUsableAfterClose()
Description copied from class:ExecutionFactory
Indicates if LOBs are usable after the execution is closed. This check is not performed for values that are alreadyClobType
orBlobType
- Overrides:
areLobsUsableAfterClose
in classExecutionFactory<ConnectionFactory,VirtualFileConnection>
- Returns:
- true if LOBs can be used after close
-
-