Package org.hibernate.sql
Class Template
java.lang.Object
org.hibernate.sql.Template
Parses SQL fragments specified in mapping documents.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncollectColumnNames
(String template) collectColumnNames
(String sql, Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry functionRegistry) static String
renderTransformerReadFragment
(String fragment, String... columnNames) static String
renderWhereStringTemplate
(String sqlWhereString, String placeholder, Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry functionRegistry) Takes the where condition provided in the mapping attribute and interpolates the alias.static String
renderWhereStringTemplate
(String sqlWhereString, Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry functionRegistry)
-
Field Details
-
PUNCTUATION
- See Also:
-
TEMPLATE
- See Also:
-
-
Method Details
-
renderTransformerReadFragment
-
renderWhereStringTemplate
public static String renderWhereStringTemplate(String sqlWhereString, Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry functionRegistry) -
renderWhereStringTemplate
public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry functionRegistry) Takes the where condition provided in the mapping attribute and interpolates the alias. Handles sub-selects, quoted identifiers, quoted strings, expressions, SQL functions, named parameters.- Parameters:
sqlWhereString
- The string into which to interpolate the placeholder valueplaceholder
- The value to be interpolated into the sqlWhereStringdialect
- The dialect to applyfunctionRegistry
- The registry of all sql functions- Returns:
- The rendered sql fragment
-
collectColumnNames
public static List<String> collectColumnNames(String sql, Dialect dialect, TypeConfiguration typeConfiguration, SqmFunctionRegistry functionRegistry) -
collectColumnNames
-