Class JsonClobType
java.lang.Object
io.hypersistence.utils.hibernate.type.MutableType<T,JDBC,JAVA>
io.hypersistence.utils.hibernate.type.MutableDynamicParameterizedType<Object,AbstractJsonJdbcTypeDescriptor,org.hibernate.type.descriptor.java.AbstractClassJavaType<Object>>
io.hypersistence.utils.hibernate.type.json.JsonClobType
- All Implemented Interfaces:
jakarta.persistence.metamodel.BasicType<Object>,jakarta.persistence.metamodel.Type<Object>,org.hibernate.metamodel.mapping.BasicValuedMapping,org.hibernate.metamodel.mapping.Bindable,org.hibernate.metamodel.mapping.JdbcMappingContainer,org.hibernate.metamodel.mapping.MappingModelExpressible,org.hibernate.metamodel.mapping.SqlExpressible,org.hibernate.metamodel.mapping.ValueMapping,org.hibernate.metamodel.model.domain.BasicDomainType<Object>,org.hibernate.metamodel.model.domain.DomainType<Object>,org.hibernate.metamodel.model.domain.ReturnableType<Object>,org.hibernate.metamodel.model.domain.SimpleDomainType<Object>,org.hibernate.type.BindableType<Object>,org.hibernate.type.descriptor.java.JavaTypedExpressible,org.hibernate.type.OutputableType<Object>,org.hibernate.usertype.DynamicParameterizedType,org.hibernate.usertype.ParameterizedType,org.hibernate.usertype.UserType<Object>
public class JsonClobType
extends MutableDynamicParameterizedType<Object,AbstractJsonJdbcTypeDescriptor,org.hibernate.type.descriptor.java.AbstractClassJavaType<Object>>
Maps any given Java object on a JSON column type that is managed via PreparedStatement.setClob(int, Clob) at JDBC Driver level.
If you are using Oracle, you can use this JsonClobType to map a CLOB column type storing JSON.
For more details about how to use it, check out this article on vladmihalcea.com.
If you want to use a more portable Hibernate Type that can work on Oracle, SQL Server, PostgreSQL, MySQL, or H2 without any configuration changes, then you should use the JsonType instead.
- Author:
- Vlad Mihalcea, Andreas Gebhardt
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
org.hibernate.metamodel.mapping.Bindable.JdbcValuesBiConsumer<X extends Object,Y extends Object>, org.hibernate.metamodel.mapping.Bindable.JdbcValuesConsumer Nested classes/interfaces inherited from interface org.hibernate.usertype.DynamicParameterizedType
org.hibernate.usertype.DynamicParameterizedType.ParameterTypeNested classes/interfaces inherited from interface jakarta.persistence.metamodel.Type
jakarta.persistence.metamodel.Type.PersistenceType -
Field Summary
FieldsFields inherited from interface org.hibernate.usertype.DynamicParameterizedType
ACCESS_TYPE, ENTITY, IS_DYNAMIC, IS_PRIMARY_KEY, PARAMETER_TYPE, PROPERTY, RETURNED_CLASS, XPROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionJsonClobType(com.fasterxml.jackson.databind.ObjectMapper objectMapper) JsonClobType(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Type javaType) JsonClobType(JsonConfiguration configuration) JsonClobType(ObjectMapperWrapper objectMapperWrapper) JsonClobType(ObjectMapperWrapper objectMapperWrapper, Type javaType) JsonClobType(Type javaType) JsonClobType(org.hibernate.type.spi.TypeBootstrapContext typeBootstrapContext) -
Method Summary
Methods inherited from class io.hypersistence.utils.hibernate.type.MutableDynamicParameterizedType
canDoExtraction, extract, extract, getJdbcType, getPersistenceType, setParameterValuesMethods inherited from class io.hypersistence.utils.hibernate.type.MutableType
assemble, deepCopy, disassemble, disassemble, equals, forEachDisassembledJdbcValue, forEachJdbcType, getConfiguration, getExpressibleJavaType, getJavaType, getJavaTypeDescriptor, getJdbcMapping, getJdbcTypeDescriptor, getMappedType, getSqlType, getTypeName, hashCode, isMutable, nullSafeGet, nullSafeSet, replace, resolveExpressible, returnedClassMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.model.domain.BasicDomainType
getJavaTypeMethods inherited from interface org.hibernate.metamodel.mapping.BasicValuedMapping
addToCacheKey, getJdbcMapping, getJdbcTypeCount, getSingleJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.type.BindableType
resolveExpressibleMethods inherited from interface org.hibernate.metamodel.model.domain.DomainType
getExpressibleJavaType, getTypeNameMethods inherited from interface org.hibernate.usertype.UserType
getDefaultSqlLength, getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlPrecision, getDefaultSqlScale, getDefaultSqlScale, getValueConverter, isComparable, nullSafeGet, nullSafeSetMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
treatAs
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
JsonClobType
public JsonClobType() -
JsonClobType
-
JsonClobType
-
JsonClobType
public JsonClobType(org.hibernate.type.spi.TypeBootstrapContext typeBootstrapContext) -
JsonClobType
public JsonClobType(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
JsonClobType
-
JsonClobType
-
JsonClobType
-
-
Method Details
-
getName
-