java.lang.Object
org.eclipse.persistence.json.JsonPlatform
- All Implemented Interfaces:
DatabaseJsonPlatform
- Direct Known Subclasses:
MySQLJsonPlatform
,Oracle21JsonPlatform
,PostgreSQL10JsonPlatform
Default JSON database platform.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertDataValueToJsonValue
(Object jdbcValue) Convert JDBCResultSet
type to JSON value field.<T> T
convertJsonValueToDataValue
(JsonValue jsonValue) INTERNAL: Convert JSON value field to JDBC statement type.boolean
isJsonType
(Type type) Check whether providedType
instance is JSON type.void
updateFieldTypes
(Hashtable<Class<?>, FieldTypeDefinition> fieldTypeMapping) Update the mapping of JSON class types to database types for the schema framework.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.internal.databaseaccess.DatabaseJsonPlatform
customParameterMarker, getJsonDataFromResultSet, unwrap, updateClassTypes
-
Constructor Details
-
JsonPlatform
public JsonPlatform()
-
-
Method Details
-
isJsonType
Check whether providedType
instance is JSON type.- Specified by:
isJsonType
in interfaceDatabaseJsonPlatform
- Parameters:
type
- type to be checked- Returns:
- value of
true
when provided value is JSON type orfalse
otherwise
-
updateFieldTypes
Update the mapping of JSON class types to database types for the schema framework.- Specified by:
updateFieldTypes
in interfaceDatabaseJsonPlatform
- Parameters:
fieldTypeMapping
-Map
with mappings to be updated.
-
convertJsonValueToDataValue
INTERNAL: Convert JSON value field to JDBC statement type. Common JSON storage type isVARCHAR
so target Java type isString
.- Type Parameters:
T
- classification type- Parameters:
jsonValue
- source JSON value field- Returns:
- converted JDBC statement type
-
convertDataValueToJsonValue
Convert JDBCResultSet
type to JSON value field. This method consumes value returned bygetJsonDataFromResultSet(ResultSet, int)
. Both methods must be overwritten by platform specific code when jdbcValue is not String.- Parameters:
jdbcValue
- source classification type value from JDBC- Returns:
- converted JSON field value
-