Class SQLFieldTransformer
java.lang.Object
com.nimbusds.infinispan.persistence.sql.transformers.SQLFieldTransformer
SQL field transformer.
-
Constructor Summary
ConstructorsConstructorDescriptionSQLFieldTransformer
(org.jooq.SQLDialect sqlDialect) Creates a new SQL field transformer. -
Method Summary
Modifier and TypeMethodDescriptionstatic Instant
parseInstant
(Timestamp timestamp) Parses a time instant from the specified SQL timestamp.static net.minidev.json.JSONObject
parseJSONObject
(String jsonObjectString) Parses a JSON object from the specified string.String[]
parseSQLStringCollection
(String fieldName, RetrievedSQLRecord sqlRecord) Parses a string array from the specified SQL record field.toSQLCollection
(Collection<?> collection) Returns the appropriate SQL representation of the specified collection.static String
toSQLString
(net.minidev.json.JSONObject jsonObject) Returns the string representation of the specified JSON object.static String
Returns the string representation of the specified object.static Timestamp
toTimestamp
(Instant instant) Returns an SQL timestamp representation of the specified instant.static String
Returns the upper case string representation of the specified object.
-
Constructor Details
-
SQLFieldTransformer
Creates a new SQL field transformer.- Parameters:
sqlDialect
- The SQL dialect. Must be for H2, MySQL, PostgreSQL 9.5+ or MS SQL Server 2016. Notnull
.
-
-
Method Details
-
toString
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
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
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
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
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
Parses a string array from the specified SQL record field.- Parameters:
fieldName
- The SQL field name. Must not benull
.sqlRecord
- The SQL record. Must not benull
.- Returns:
- The string array,
null
if not specified.
-
parseJSONObject
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
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.
-