Class SafeQuery.Translator

java.lang.Object
com.google.guava.labs.safesql.SafeQuery.Translator
Enclosing class:
SafeQuery

@Deprecated public static class SafeQuery.Translator extends Object
Deprecated.
You most likely need SafeSql to work with JDBC
An SPI class for subclasses to provide additional translation from placeholder values to safe query strings.
Since:
7.2
  • Constructor Details

    • Translator

      protected Translator()
      Deprecated.
  • Method Details

    • translate

      public final StringFormat.Template<SafeQuery> translate(@CompileTimeConstant String template)
      Deprecated.
      Translates template to a factory of SafeQuery by filling the provided parameters in the places of corresponding placeholders.
    • translateLiteral

      protected SafeQuery translateLiteral(Substring.Match placeholder, Object value)
      Deprecated.
      Called if a placeholder value is a non-string, non-Iterable literal appearing unquoted in the template.

      Subclasses should translate their trusted types and delegate to super.translateLiteral() for all other types.

      Parameters:
      placeholder - the placeholder in the template to be filled with value
      value - the literal value to fill in (not CharSequence or Character). Can be null.
      Returns:
      a sub-query to be filled into the result query in the place of placeholder
      Since:
      8.0