Class SQLFieldTransformer

java.lang.Object
com.nimbusds.infinispan.persistence.sql.transformers.SQLFieldTransformer

@ThreadSafe public class SQLFieldTransformer extends Object
SQL field transformer.
  • Constructor Details

    • SQLFieldTransformer

      public SQLFieldTransformer(org.jooq.SQLDialect sqlDialect)
      Creates a new SQL field transformer.
      Parameters:
      sqlDialect - The SQL dialect. Must be for H2, MySQL, PostgreSQL 9.5+ or MS SQL Server 2016. Not null.
  • Method Details

    • toString

      public static String toString(Object o)
      Returns the string representation of the specified object.
      Parameters:
      o - The object, null if not specified.
      Returns:
      The string representation, null if not specified.
    • toUpperCaseString

      public static String toUpperCaseString(Object o)
      Returns the upper case string representation of the specified object.
      Parameters:
      o - The object, null if not specified.
      Returns:
      The upper case string representation, null if not specified.
    • toSQLCollection

      public Object toSQLCollection(Collection<?> collection)
      Returns the appropriate SQL representation of the specified collection.
      Parameters:
      collection - The collection, null if not specified.
      Returns:
      The SQL collection representation, null if not specified.
    • toSQLString

      public static String toSQLString(net.minidev.json.JSONObject jsonObject)
      Returns the string representation of the specified JSON object.
      Parameters:
      jsonObject - The JSON object, null if not specified.
      Returns:
      The JSON object string representation, null if not specified.
    • toTimestamp

      public static Timestamp toTimestamp(Instant instant)
      Returns an SQL timestamp representation of the specified instant.
      Parameters:
      instant - The instant, null if not specified.
      Returns:
      The SQL timestamp, null if not specified.
    • parseSQLStringCollection

      public String[] parseSQLStringCollection(String fieldName, RetrievedSQLRecord sqlRecord)
      Parses a string array from the specified SQL record field.
      Parameters:
      fieldName - The SQL field name. Must not be null.
      sqlRecord - The SQL record. Must not be null.
      Returns:
      The string array, null if not specified.
    • parseJSONObject

      public static net.minidev.json.JSONObject parseJSONObject(String jsonObjectString)
      Parses a JSON object from the specified string.
      Parameters:
      jsonObjectString - The JSON object string, null if not specified.
      Returns:
      The JSON object, null if not specified.
    • parseInstant

      public static Instant parseInstant(Timestamp timestamp)
      Parses a time instant from the specified SQL timestamp.
      Parameters:
      timestamp - The SQL timestamp, null if not specified.
      Returns:
      The time instant, null if not specified.