Class JsonTypeDescriptor

java.lang.Object
org.hibernate.type.descriptor.java.AbstractTypeDescriptor<Object>
org.pidome.server.system.utils.hibernate.JsonTypeDescriptor
All Implemented Interfaces:
Serializable, org.hibernate.type.descriptor.java.BasicJavaDescriptor<Object>, org.hibernate.type.descriptor.java.JavaTypeDescriptor<Object>, org.hibernate.usertype.DynamicParameterizedType, org.hibernate.usertype.ParameterizedType

public class JsonTypeDescriptor extends org.hibernate.type.descriptor.java.AbstractTypeDescriptor<Object> implements org.hibernate.usertype.DynamicParameterizedType
A json type descriptor. This is a simple descriptor.
See Also:
Serialized Form
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.hibernate.usertype.DynamicParameterizedType

    org.hibernate.usertype.DynamicParameterizedType.ParameterType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Descriptor instance.

    Fields inherited from interface org.hibernate.usertype.DynamicParameterizedType

    ACCESS_TYPE, ENTITY, IS_DYNAMIC, IS_PRIMARY_KEY, PARAMETER_TYPE, PROPERTY, RETURNED_CLASS, XPROPERTY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Descriptor constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromString​(String string)
    To object.
    void
    Sets the parameter values.
    toString​(Object value)
    To string.
    <X> X
    unwrap​(Object value, Class<X> type, org.hibernate.type.descriptor.WrapperOptions options)
    Unwrap the object.
    <X> Object
    wrap​(X value, org.hibernate.type.descriptor.WrapperOptions options)
    Wrap.

    Methods inherited from class org.hibernate.type.descriptor.java.AbstractTypeDescriptor

    areEqual, extractHashCode, extractLoggableRepresentation, getComparator, getJavaType, getJavaTypeClass, getMutabilityPlan, unknownUnwrap, unknownWrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.hibernate.type.descriptor.java.BasicJavaDescriptor

    getJdbcRecommendedSqlType
  • Field Details

  • Constructor Details

    • JsonTypeDescriptor

      public JsonTypeDescriptor()
      Descriptor constructor.
  • Method Details

    • toString

      public String toString(Object value)
      To string.
      Specified by:
      toString in interface org.hibernate.type.descriptor.java.JavaTypeDescriptor<Object>
      Parameters:
      value - The value to string.
      Returns:
      The string value.
    • fromString

      public Object fromString(String string)
      To object.
      Specified by:
      fromString in interface org.hibernate.type.descriptor.java.JavaTypeDescriptor<Object>
      Parameters:
      string - The string to object.
      Returns:
      The object.
    • unwrap

      public <X> X unwrap(Object value, Class<X> type, org.hibernate.type.descriptor.WrapperOptions options)
      Unwrap the object.
      Specified by:
      unwrap in interface org.hibernate.type.descriptor.java.JavaTypeDescriptor<Object>
      Type Parameters:
      X - The type.
      Parameters:
      value - The control group.
      type - The type.
      options - The options.
      Returns:
      Unwrapped to the type.
    • wrap

      public <X> Object wrap(X value, org.hibernate.type.descriptor.WrapperOptions options)
      Wrap.
      Specified by:
      wrap in interface org.hibernate.type.descriptor.java.JavaTypeDescriptor<Object>
      Type Parameters:
      X - The type.
      Parameters:
      value - The value.
      options - The options.
      Returns:
      the object wrapped.
    • setParameterValues

      public void setParameterValues(Properties parameters)
      Sets the parameter values.
      Specified by:
      setParameterValues in interface org.hibernate.usertype.ParameterizedType
      Parameters:
      parameters - The parameters to set.