Module eclipselink
Class Oracle21JsonPlatform
java.lang.Object
org.eclipse.persistence.json.JsonPlatform
org.eclipse.persistence.platform.database.oracle.json.Oracle21JsonPlatform
- All Implemented Interfaces:
org.eclipse.persistence.internal.databaseaccess.DatabaseJsonPlatform
public class Oracle21JsonPlatform
extends org.eclipse.persistence.json.JsonPlatform
Oracle 21c JSON database platform.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.json.JsonValueconvertDataValueToJsonValue(Object jdbcValue) INTERNAL: Convert JDBCResultSettype to JSON value field.<T> TconvertJsonValueToDataValue(jakarta.json.JsonValue jsonValue) INTERNAL: Convert JSON value field to JDBC statement type.<T> TgetJsonDataFromResultSet(ResultSet resultSet, int columnNumber, Class<T> type) Retrieve JSON data from JDBCResultSet.voidupdateClassTypes(Map<String, Class<?>> classTypeMapping) Update the mapping of Oracle 21c database types to class types for the schema framework.voidupdateFieldTypes(Hashtable<Class<?>, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition> fieldTypeMapping) Update the mapping of JSON class types to Oracle 21c database types for the schema framework.Methods inherited from class org.eclipse.persistence.json.JsonPlatform
isJsonTypeMethods 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, unwrap
-
Constructor Details
-
Oracle21JsonPlatform
public Oracle21JsonPlatform()
-
-
Method Details
-
updateClassTypes
Update the mapping of Oracle 21c database types to class types for the schema framework.- Parameters:
classTypeMapping-Mapwith mappings to be updated.
-
updateFieldTypes
public void updateFieldTypes(Hashtable<Class<?>, org.eclipse.persistence.internal.databaseaccess.FieldTypeDefinition> fieldTypeMapping) Update the mapping of JSON class types to Oracle 21c database types for the schema framework.- Specified by:
updateFieldTypesin interfaceorg.eclipse.persistence.internal.databaseaccess.DatabaseJsonPlatform- Overrides:
updateFieldTypesin classorg.eclipse.persistence.json.JsonPlatform- Parameters:
fieldTypeMapping-Mapwith mappings to be updated.
-
convertJsonValueToDataValue
public <T> T convertJsonValueToDataValue(jakarta.json.JsonValue jsonValue) throws jakarta.persistence.PersistenceException INTERNAL: Convert JSON value field to JDBC statement type. Postgres JSON storage type isJSONBand target Java type isPGobject.- Overrides:
convertJsonValueToDataValuein classorg.eclipse.persistence.json.JsonPlatform- Type Parameters:
T- classification type- Parameters:
jsonValue- source JSON value field- Returns:
- converted JDBC statement type
- Throws:
jakarta.persistence.PersistenceException
-
convertDataValueToJsonValue
INTERNAL: Convert JDBCResultSettype to JSON value field.- Overrides:
convertDataValueToJsonValuein classorg.eclipse.persistence.json.JsonPlatform- Parameters:
jdbcValue- source classification type value from JDBC- Returns:
- converted JSON field value
-
getJsonDataFromResultSet
public <T> T getJsonDataFromResultSet(ResultSet resultSet, int columnNumber, Class<T> type) throws SQLException Retrieve JSON data from JDBCResultSet. JSON data retrieved from Postgres JDBCResultSetare returned asOracleJsonValueinstance.JsonTypeConverterwill convertOracleJsonValuetoJsonValue.- Type Parameters:
T- target type to return- Parameters:
resultSet- source JDBCResultSetcolumnNumber- index of column in JDBCResultSettype- target class to return, this class will be used to cast returned value- Returns:
- JSON data from JDBC
ResultSetasStringto be parsed by commonJsonTypeConverter - Throws:
SQLException- if data could not be retrieved
-