com.vladmihalcea.hibernate.type.json.internal
Class JsonBytesSqlTypeDescriptor

java.lang.Object
  extended by com.vladmihalcea.hibernate.type.json.internal.AbstractJsonSqlTypeDescriptor
      extended by com.vladmihalcea.hibernate.type.json.internal.JsonBytesSqlTypeDescriptor
All Implemented Interfaces:
Serializable, org.hibernate.type.descriptor.sql.SqlTypeDescriptor

public class JsonBytesSqlTypeDescriptor
extends AbstractJsonSqlTypeDescriptor

Author:
Vlad Mihalcea
See Also:
Serialized Form

Field Summary
static String CHARSET
           
static JsonBytesSqlTypeDescriptor INSTANCE
           
 
Constructor Summary
JsonBytesSqlTypeDescriptor()
           
 
Method Summary
protected  Object extractJson(CallableStatement statement, int index)
           
protected  Object extractJson(CallableStatement statement, String name)
           
protected  Object extractJson(ResultSet rs, String name)
           
protected  String fromJsonBytes(byte[] jsonBytes)
           
<X> org.hibernate.type.descriptor.ValueBinder<X>
getBinder(org.hibernate.type.descriptor.java.JavaTypeDescriptor<X> javaTypeDescriptor)
           
 int getSqlType()
           
protected  byte[] toJsonBytes(String jsonValue)
           
 
Methods inherited from class com.vladmihalcea.hibernate.type.json.internal.AbstractJsonSqlTypeDescriptor
canBeRemapped, getExtractor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final JsonBytesSqlTypeDescriptor INSTANCE

CHARSET

public static final String CHARSET
See Also:
Constant Field Values
Constructor Detail

JsonBytesSqlTypeDescriptor

public JsonBytesSqlTypeDescriptor()
Method Detail

getSqlType

public int getSqlType()
Specified by:
getSqlType in interface org.hibernate.type.descriptor.sql.SqlTypeDescriptor
Overrides:
getSqlType in class AbstractJsonSqlTypeDescriptor

getBinder

public <X> org.hibernate.type.descriptor.ValueBinder<X> getBinder(org.hibernate.type.descriptor.java.JavaTypeDescriptor<X> javaTypeDescriptor)

extractJson

protected Object extractJson(ResultSet rs,
                             String name)
                      throws SQLException
Overrides:
extractJson in class AbstractJsonSqlTypeDescriptor
Throws:
SQLException

extractJson

protected Object extractJson(CallableStatement statement,
                             int index)
                      throws SQLException
Overrides:
extractJson in class AbstractJsonSqlTypeDescriptor
Throws:
SQLException

extractJson

protected Object extractJson(CallableStatement statement,
                             String name)
                      throws SQLException
Overrides:
extractJson in class AbstractJsonSqlTypeDescriptor
Throws:
SQLException

toJsonBytes

protected byte[] toJsonBytes(String jsonValue)

fromJsonBytes

protected String fromJsonBytes(byte[] jsonBytes)


Copyright © 2021. All rights reserved.