public final class Template
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Template.NoOpColumnMapper |
Modifier and Type | Field and Description |
---|---|
static OrderByAliasResolver |
LEGACY_ORDER_BY_ALIAS_RESOLVER |
static java.lang.String |
TEMPLATE |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
renderOrderByStringTemplate(java.lang.String orderByFragment,
ColumnMapper columnMapper,
SessionFactoryImplementor sessionFactory,
Dialect dialect,
SQLFunctionRegistry functionRegistry) |
static java.lang.String |
renderOrderByStringTemplate(java.lang.String orderByFragment,
Dialect dialect,
SQLFunctionRegistry functionRegistry)
|
static java.lang.String |
renderWhereStringTemplate(java.lang.String sqlWhereString,
Dialect dialect,
SQLFunctionRegistry functionRegistry) |
static java.lang.String |
renderWhereStringTemplate(java.lang.String sqlWhereString,
java.lang.String placeholder,
Dialect dialect)
Deprecated.
Only intended for annotations usage; use
renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry) instead |
static java.lang.String |
renderWhereStringTemplate(java.lang.String sqlWhereString,
java.lang.String placeholder,
Dialect dialect,
SQLFunctionRegistry functionRegistry)
Takes the where condition provided in the mapping attribute and interpolates the alias.
|
static OrderByTranslation |
translateOrderBy(java.lang.String orderByFragment,
ColumnMapper columnMapper,
SessionFactoryImplementor sessionFactory,
Dialect dialect,
SQLFunctionRegistry functionRegistry)
Performs order-by template rendering allowing
column mapping . |
public static final java.lang.String TEMPLATE
public static OrderByAliasResolver LEGACY_ORDER_BY_ALIAS_RESOLVER
public static java.lang.String renderWhereStringTemplate(java.lang.String sqlWhereString, Dialect dialect, SQLFunctionRegistry functionRegistry)
@Deprecated public static java.lang.String renderWhereStringTemplate(java.lang.String sqlWhereString, java.lang.String placeholder, Dialect dialect)
renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry)
insteadrenderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry)
,
except that a SQLFunctionRegistry is not provided (i.e., only the dialect-defined functions are
considered). This is only intended for use by the annotations project until the
many-to-many/map-key-from-target-table feature is pulled into core.public static java.lang.String renderWhereStringTemplate(java.lang.String sqlWhereString, java.lang.String placeholder, Dialect dialect, SQLFunctionRegistry functionRegistry)
sqlWhereString
- The string into which to interpolate the placeholder valueplaceholder
- The value to be interpolated into the the sqlWhereStringdialect
- The dialect to applyfunctionRegistry
- The registry of all sql functions@Deprecated public static java.lang.String renderOrderByStringTemplate(java.lang.String orderByFragment, Dialect dialect, SQLFunctionRegistry functionRegistry)
translateOrderBy(java.lang.String, org.hibernate.sql.ordering.antlr.ColumnMapper, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.dialect.Dialect, org.hibernate.dialect.function.SQLFunctionRegistry)
insteadcolumn mapping
. An ORDER BY template
has all column references "qualified" with a placeholder identified by TEMPLATE
orderByFragment
- The order-by fragment to render.dialect
- The SQL dialect being used.functionRegistry
- The SQL function registrypublic static java.lang.String renderOrderByStringTemplate(java.lang.String orderByFragment, ColumnMapper columnMapper, SessionFactoryImplementor sessionFactory, Dialect dialect, SQLFunctionRegistry functionRegistry)
public static OrderByTranslation translateOrderBy(java.lang.String orderByFragment, ColumnMapper columnMapper, SessionFactoryImplementor sessionFactory, Dialect dialect, SQLFunctionRegistry functionRegistry)
column mapping
. An ORDER BY template
has all column references "qualified" with a placeholder identified by TEMPLATE
which can later
be used to easily inject the SQL alias.orderByFragment
- The order-by fragment to render.columnMapper
- The column mapping strategy to use.sessionFactory
- The session factory.dialect
- The SQL dialect being used.functionRegistry
- The SQL function registryCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.