Interface SqlAstTranslatorFactory
- All Known Implementing Classes:
StandardSqlAstTranslatorFactory
Factory supplied by a Dialect for creating single-use SQL AST translators.
Implementors should normally extend StandardSqlAstTranslatorFactory and
override its typed creation hook. Return a translator derived from
AbstractSqlAstTranslator, or an appropriate supported family base, when
rendering SQL. For a fundamentally different JDBC command language, the
factory may instead return a direct
SqlAstTranslator implementation,
normally based on AbstractSqlAstWalker. A factory
may inspect the SqlAstTranslationRequest subtype, but must preserve its
statement-to-JDBC-operation type relationship and must not retain the request.
Hibernate may reuse a factory for the lifetime of the Dialect, so a supplied
factory should be stateless or otherwise safe for concurrent use. Each
translator returned by buildTranslator(SqlAstTranslationRequest) is used for exactly one request.
- Since:
- 8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<S extends Statement, O extends JdbcOperation>
SqlAstTranslator<O> buildTranslator(SqlAstTranslationRequest<S, O> request) Build a single-use translator for the given typed request.
-
Method Details
-
buildTranslator
@SPI({IMPLEMENT,SUPPLY}) <S extends Statement, O extends JdbcOperation> SqlAstTranslator<O> buildTranslator(SqlAstTranslationRequest<S, O> request) Build a single-use translator for the given typed request.- Parameters:
request- complete translation input; nevernull- Returns:
- a non-null translator compatible with the request's result type
-