Class Template


  • public final class Template
    extends Object
    Parses SQL fragments specified in mapping documents
    • Method Detail

      • renderTransformerReadFragment

        public static String renderTransformerReadFragment​(String fragment,
                                                           String... columnNames)
      • renderWhereStringTemplate

        public static String renderWhereStringTemplate​(String sqlWhereString,
                                                       String placeholder,
                                                       Dialect dialect,
                                                       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 value
        placeholder - The value to be interpolated into the the sqlWhereString
        dialect - The dialect to apply
        functionRegistry - The registry of all sql functions
        Returns:
        The rendered sql fragment