Class JsonBytesSqlTypeDescriptor
- java.lang.Object
-
- com.vladmihalcea.hibernate.type.json.internal.AbstractJsonSqlTypeDescriptor
-
- com.vladmihalcea.hibernate.type.json.internal.JsonBytesSqlTypeDescriptor
-
- All Implemented Interfaces:
java.io.Serializable
,org.hibernate.type.descriptor.sql.SqlTypeDescriptor
public class JsonBytesSqlTypeDescriptor extends AbstractJsonSqlTypeDescriptor
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CHARSET
static JsonBytesSqlTypeDescriptor
INSTANCE
private static java.util.Map<org.hibernate.dialect.Database,JsonBytesSqlTypeDescriptor>
INSTANCE_MAP
private int
jdbcType
-
Constructor Summary
Constructors Constructor Description JsonBytesSqlTypeDescriptor()
JsonBytesSqlTypeDescriptor(int jdbcType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
extractJson(java.sql.CallableStatement statement, int index)
protected java.lang.Object
extractJson(java.sql.CallableStatement statement, java.lang.String name)
protected java.lang.Object
extractJson(java.sql.ResultSet rs, java.lang.String name)
protected java.lang.String
fromJsonBytes(byte[] jsonBytes)
<X> org.hibernate.type.descriptor.ValueBinder<X>
getBinder(org.hibernate.type.descriptor.java.JavaTypeDescriptor<X> javaTypeDescriptor)
int
getSqlType()
static JsonBytesSqlTypeDescriptor
of(org.hibernate.dialect.Database database)
protected byte[]
toJsonBytes(java.lang.String jsonValue)
-
Methods inherited from class com.vladmihalcea.hibernate.type.json.internal.AbstractJsonSqlTypeDescriptor
canBeRemapped, getExtractor
-
-
-
-
Field Detail
-
INSTANCE
public static final JsonBytesSqlTypeDescriptor INSTANCE
-
INSTANCE_MAP
private static final java.util.Map<org.hibernate.dialect.Database,JsonBytesSqlTypeDescriptor> INSTANCE_MAP
-
CHARSET
public static final java.lang.String CHARSET
- See Also:
- Constant Field Values
-
jdbcType
private final int jdbcType
-
-
Method Detail
-
of
public static JsonBytesSqlTypeDescriptor of(org.hibernate.dialect.Database database)
-
getSqlType
public int getSqlType()
- Specified by:
getSqlType
in interfaceorg.hibernate.type.descriptor.sql.SqlTypeDescriptor
- Overrides:
getSqlType
in classAbstractJsonSqlTypeDescriptor
-
getBinder
public <X> org.hibernate.type.descriptor.ValueBinder<X> getBinder(org.hibernate.type.descriptor.java.JavaTypeDescriptor<X> javaTypeDescriptor)
-
extractJson
protected java.lang.Object extractJson(java.sql.ResultSet rs, java.lang.String name) throws java.sql.SQLException
- Overrides:
extractJson
in classAbstractJsonSqlTypeDescriptor
- Throws:
java.sql.SQLException
-
extractJson
protected java.lang.Object extractJson(java.sql.CallableStatement statement, int index) throws java.sql.SQLException
- Overrides:
extractJson
in classAbstractJsonSqlTypeDescriptor
- Throws:
java.sql.SQLException
-
extractJson
protected java.lang.Object extractJson(java.sql.CallableStatement statement, java.lang.String name) throws java.sql.SQLException
- Overrides:
extractJson
in classAbstractJsonSqlTypeDescriptor
- Throws:
java.sql.SQLException
-
toJsonBytes
protected byte[] toJsonBytes(java.lang.String jsonValue)
-
fromJsonBytes
protected java.lang.String fromJsonBytes(byte[] jsonBytes)
-
-