@Translator(name="jpa2", description="A translator for JPA2 based entities") public class JPA2ExecutionFactory extends ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS
Constructor and Description |
---|
JPA2ExecutionFactory() |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection(javax.persistence.EntityManager connection,
javax.persistence.EntityManagerFactory factory)
Closes a connection object from the given connection factory.
|
ProcedureExecution |
createDirectExecution(List<Argument> arguments,
Command command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
javax.persistence.EntityManager connection) |
ProcedureExecution |
createProcedureExecution(Call command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
javax.persistence.EntityManager connection) |
ResultSetExecution |
createResultSetExecution(QueryExpression command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
javax.persistence.EntityManager connection) |
UpdateExecution |
createUpdateExecution(Command command,
ExecutionContext executionContext,
RuntimeMetadata metadata,
javax.persistence.EntityManager connection) |
javax.persistence.EntityManager |
getConnection(javax.persistence.EntityManagerFactory factory,
ExecutionContext executionContext)
Return a connection object from the given connection factory.
|
List<String> |
getDefaultSupportedFunctions() |
Map<String,FunctionModifier> |
getFunctionModifiers()
Return a map of function name to FunctionModifier.
|
MetadataProcessor<javax.persistence.EntityManager> |
getMetadataProcessor()
Get a MetadataProcessor for the translator to read the metadata.
|
List<String> |
getSupportedFunctions()
Get list of all supported function names.
|
void |
registerFunctionModifier(String name,
FunctionModifier modifier)
Add the
FunctionModifier to the set of known modifiers. |
void |
start()
Initialize the connector with supplied configuration
|
boolean |
supportsAggregatesAvg()
Support indicates connector can accept the AVG aggregate function
|
boolean |
supportsAggregatesCount()
Support indicates connector can accept the COUNT aggregate function
|
boolean |
supportsAggregatesCountStar()
Support indicates connector can accept the COUNT(*) aggregate function
|
boolean |
supportsAggregatesDistinct()
Support indicates connector can accept DISTINCT within aggregate functions
|
boolean |
supportsAggregatesMax()
Support indicates connector can accept the MAX aggregate function
|
boolean |
supportsAggregatesMin()
Support indicates connector can accept the MIN aggregate function
|
boolean |
supportsAggregatesSum()
Support indicates connector can accept the SUM aggregate function
|
boolean |
supportsAliasedTable()
Support indicates connector can accept groups with aliases
|
boolean |
supportsCompareCriteriaEquals()
Support indicates connector accepts criteria of form (element = constant)
|
boolean |
supportsCompareCriteriaOrdered()
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported. |
boolean |
supportsDependentJoins()
NOTE: The pushed independent tuples will not have been
converted to a unique set and may contain duplicates.
|
boolean |
supportsExistsCriteria()
Support indicates connector accepts the EXISTS criteria
|
boolean |
supportsGroupBy()
Whether the source supports an explicit GROUP BY clause
|
boolean |
supportsHaving()
Whether the source supports the HAVING clause
|
boolean |
supportsInCriteria()
Support indicates connector accepts criteria of form (element IN set)
|
boolean |
supportsInCriteriaSubquery()
Support indicates connector accepts IN criteria with a subquery on the right side
|
boolean |
supportsInlineViews()
Support indicates connector can accept inline views (subqueries
in the FROM clause).
|
boolean |
supportsIsNullCriteria()
Support indicates connector accepts criteria of form (element IS NULL)
|
boolean |
supportsLikeCriteria()
Support indicates connector accepts criteria of form (element LIKE constant)
|
boolean |
supportsNotCriteria()
Support indicates connector accepts logical criteria NOT
|
boolean |
supportsOrCriteria()
Support indicates connector accepts logical criteria connected by OR
|
boolean |
supportsRowLimit()
Gets whether the connector can limit the number of rows returned by a query.
|
boolean |
supportsRowOffset()
Gets whether the connector supports a SQL clause (similar to the LIMIT with an offset) that can return
result sets that start in the middle of the resulting rows returned by a query
|
boolean |
supportsScalarSubqueries()
Support indicates connector can accept scalar subqueries in the SELECT, WHERE, and
HAVING clauses
|
boolean |
supportsSelectExpression()
Support indicates connector can accept expressions other than element
symbols in the SELECT clause.
|
boolean |
supportsSelfJoins()
Support indicates connector can accept self-joins where a
group is joined to itself with aliases.
|
boolean |
useAnsiJoin()
Whether the source prefers to use ANSI style joins.
|
addPushDownFunction, areLobsUsableAfterClose, createExecution, getCacheDirective, getCollationLocale, getConnection, getDefaultNullOrder, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getMetadata, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedJoinCriteria, getTransactionSupport, getTypeFacility, initCapabilities, isCopyLobs, isForkable, isImmutable, isSourceRequired, isSourceRequiredForCapabilities, 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, supportsAdvancedOlapOperations, supportsAggregatesCountBig, supportsAggregatesEnhancedNumeric, supportsArrayAgg, supportsArrayType, supportsBatchedUpdates, supportsBulkUpdate, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueries, supportsCorrelatedSubqueryLimit, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsFormatLiteral, supportsFullDependentJoins, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsInnerJoins, supportsInsertWithQueryExpression, supportsIntersect, supportsIsDistinctCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeCriteriaEscapeCharacter, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderBy, supportsOrderByNullOrdering, supportsOrderByUnrelated, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureTable, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsRecursiveCommonTableExpressions, supportsScalarSubqueryProjection, supportsSearchedCaseExpressions, supportsSelectDistinct, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSetQueryLimitOffset, supportsSetQueryOrderBy, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUnions, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useBindingsForDependentJoin
public void start() throws TranslatorException
ExecutionFactory
start
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
TranslatorException
public javax.persistence.EntityManager getConnection(javax.persistence.EntityManagerFactory factory, ExecutionContext executionContext) throws TranslatorException
ExecutionFactory
ConnectionFactory
. 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 ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
executionContext
- null if this is a system request for a connectionTranslatorException
public void closeConnection(javax.persistence.EntityManager connection, javax.persistence.EntityManagerFactory factory)
ExecutionFactory
Connection
. Subclasses should override, if they use
another type of connection.closeConnection
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, javax.persistence.EntityManager connection) throws TranslatorException
createResultSetExecution
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
TranslatorException
public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, javax.persistence.EntityManager connection) throws TranslatorException
createProcedureExecution
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
TranslatorException
public UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, javax.persistence.EntityManager connection) throws TranslatorException
createUpdateExecution
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
TranslatorException
public ProcedureExecution createDirectExecution(List<Argument> arguments, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, javax.persistence.EntityManager connection) throws TranslatorException
createDirectExecution
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
TranslatorException
public MetadataProcessor<javax.persistence.EntityManager> getMetadataProcessor()
ExecutionFactory
getMetadataProcessor
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsSelectExpression()
ExecutionFactory
supportsSelectExpression
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsAliasedTable()
ExecutionFactory
supportsAliasedTable
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsInlineViews()
ExecutionFactory
supportsInlineViews
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsCompareCriteriaEquals()
ExecutionFactory
supportsCompareCriteriaEquals
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsCompareCriteriaOrdered()
ExecutionFactory
supportsCompareCriteriaOrdered
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsLikeCriteria()
ExecutionFactory
supportsLikeCriteria
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsInCriteria()
ExecutionFactory
supportsInCriteria
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsInCriteriaSubquery()
ExecutionFactory
supportsInCriteriaSubquery
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsIsNullCriteria()
ExecutionFactory
supportsIsNullCriteria
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsOrCriteria()
ExecutionFactory
supportsOrCriteria
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsNotCriteria()
ExecutionFactory
supportsNotCriteria
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsExistsCriteria()
ExecutionFactory
supportsExistsCriteria
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsGroupBy()
ExecutionFactory
supportsGroupBy
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsHaving()
ExecutionFactory
supportsHaving
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsAggregatesSum()
ExecutionFactory
supportsAggregatesSum
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsAggregatesAvg()
ExecutionFactory
supportsAggregatesAvg
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsAggregatesMin()
ExecutionFactory
supportsAggregatesMin
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsAggregatesMax()
ExecutionFactory
supportsAggregatesMax
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsAggregatesCount()
ExecutionFactory
supportsAggregatesCount
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsAggregatesCountStar()
ExecutionFactory
supportsAggregatesCountStar
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsAggregatesDistinct()
ExecutionFactory
supportsAggregatesDistinct
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsScalarSubqueries()
ExecutionFactory
supportsScalarSubqueries
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean useAnsiJoin()
ExecutionFactory
useAnsiJoin
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsDependentJoins()
ExecutionFactory
supportsDependentJoins
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsSelfJoins()
ExecutionFactory
ExecutionFactory.supportsAliasedTable()
.supportsSelfJoins
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsRowLimit()
ExecutionFactory
supportsRowLimit
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public boolean supportsRowOffset()
ExecutionFactory
supportsRowOffset
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
public List<String> getSupportedFunctions()
ExecutionFactory
getSupportedFunctions
in class ExecutionFactory<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager>
for a listing of system pushdown functions. Note that
not all system functions are listed as some functions will use a common name
such as CONCAT vs. the || operator, and other functions will be rewritten and
not pushed down, such as SPACE.
Note: User defined functions should be specified fully qualified.
public Map<String,FunctionModifier> getFunctionModifiers()
public void registerFunctionModifier(String name, FunctionModifier modifier)
FunctionModifier
to the set of known modifiers.name
- modifier
- Copyright © 2019. All rights reserved.