java.lang.Object
org.eclipse.persistence.json.JsonPlatform
- All Implemented Interfaces:
DatabaseJsonPlatform
- Direct Known Subclasses:
MySQLJsonPlatform,Oracle21JsonPlatform,PostgreSQL10JsonPlatform
Default JSON database platform.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertDataValueToJsonValue(Object jdbcValue) Convert JDBCResultSettype to JSON value field.<T> TconvertJsonValueToDataValue(JsonValue jsonValue) INTERNAL: Convert JSON value field to JDBC statement type.booleanisJsonType(Type type) Check whether providedTypeinstance is JSON type.voidupdateFieldTypes(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, waitMethods inherited from interface org.eclipse.persistence.internal.databaseaccess.DatabaseJsonPlatform
customParameterMarker, getJsonDataFromResultSet, unwrap, updateClassTypes
-
Constructor Details
-
JsonPlatform
public JsonPlatform()
-
-
Method Details
-
isJsonType
Check whether providedTypeinstance is JSON type.- Specified by:
isJsonTypein interfaceDatabaseJsonPlatform- Parameters:
type- type to be checked- Returns:
- value of
truewhen provided value is JSON type orfalseotherwise
-
updateFieldTypes
Update the mapping of JSON class types to database types for the schema framework.- Specified by:
updateFieldTypesin interfaceDatabaseJsonPlatform- Parameters:
fieldTypeMapping-Mapwith mappings to be updated.
-
convertJsonValueToDataValue
INTERNAL: Convert JSON value field to JDBC statement type. Common JSON storage type isVARCHARso target Java type isString.- Type Parameters:
T- classification type- Parameters:
jsonValue- source JSON value field- Returns:
- converted JDBC statement type
-
convertDataValueToJsonValue
Convert JDBCResultSettype 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
-