Class CodeEnumType

java.lang.Object
net.binis.codegen.hibernate.CodeEnumType
All Implemented Interfaces:
Serializable, org.hibernate.type.spi.TypeConfigurationAware, org.hibernate.usertype.DynamicParameterizedType, org.hibernate.usertype.EnhancedUserType<net.binis.codegen.objects.base.enumeration.CodeEnum>, org.hibernate.usertype.LoggableUserType, org.hibernate.usertype.ParameterizedType, org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>

public class CodeEnumType extends Object implements org.hibernate.usertype.EnhancedUserType<net.binis.codegen.objects.base.enumeration.CodeEnum>, org.hibernate.usertype.DynamicParameterizedType, org.hibernate.usertype.LoggableUserType, org.hibernate.type.spi.TypeConfigurationAware, Serializable
See Also:
  • 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
    static final String
     
    static final String
     
    static final String
     

    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
     
    CodeEnumType(Class<net.binis.codegen.objects.base.enumeration.CodeEnum> enumClass, CodeEnumValueConverter enumValueConverter, org.hibernate.type.spi.TypeConfiguration typeConfiguration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.binis.codegen.objects.base.enumeration.CodeEnum
    assemble(Serializable cached, Object owner)
     
    net.binis.codegen.objects.base.enumeration.CodeEnum
    deepCopy(net.binis.codegen.objects.base.enumeration.CodeEnum value)
     
    disassemble(net.binis.codegen.objects.base.enumeration.CodeEnum value)
     
    boolean
    equals(net.binis.codegen.objects.base.enumeration.CodeEnum x, net.binis.codegen.objects.base.enumeration.CodeEnum y)
     
    net.binis.codegen.objects.base.enumeration.CodeEnum
     
     
    org.hibernate.type.descriptor.jdbc.JdbcType
    getJdbcType(org.hibernate.type.spi.TypeConfiguration typeConfiguration)
     
    int
     
    org.hibernate.type.spi.TypeConfiguration
     
    org.hibernate.metamodel.model.convert.spi.BasicValueConverter<net.binis.codegen.objects.base.enumeration.CodeEnum,Object>
     
    int
    hashCode(net.binis.codegen.objects.base.enumeration.CodeEnum x)
     
    boolean
     
    boolean
     
    net.binis.codegen.objects.base.enumeration.CodeEnum
    nullSafeGet(ResultSet rs, int position, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner)
     
    void
    nullSafeSet(PreparedStatement st, net.binis.codegen.objects.base.enumeration.CodeEnum value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session)
     
    net.binis.codegen.objects.base.enumeration.CodeEnum
    replace(net.binis.codegen.objects.base.enumeration.CodeEnum original, net.binis.codegen.objects.base.enumeration.CodeEnum target, Object owner)
     
    Class<net.binis.codegen.objects.base.enumeration.CodeEnum>
     
    void
     
    void
    setTypeConfiguration(org.hibernate.type.spi.TypeConfiguration typeConfiguration)
     
    toLoggableString(Object value, org.hibernate.engine.spi.SessionFactoryImplementor factory)
     
    toSqlLiteral(net.binis.codegen.objects.base.enumeration.CodeEnum value)
     
    toString(net.binis.codegen.objects.base.enumeration.CodeEnum value)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.hibernate.usertype.UserType

    getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlScale
  • Field Details

  • Constructor Details

    • CodeEnumType

      public CodeEnumType()
    • CodeEnumType

      public CodeEnumType(Class<net.binis.codegen.objects.base.enumeration.CodeEnum> enumClass, CodeEnumValueConverter enumValueConverter, org.hibernate.type.spi.TypeConfiguration typeConfiguration)
  • Method Details

    • getEnumValueConverter

      public CodeEnumValueConverter getEnumValueConverter()
    • getJdbcType

      public org.hibernate.type.descriptor.jdbc.JdbcType getJdbcType(org.hibernate.type.spi.TypeConfiguration typeConfiguration)
      Specified by:
      getJdbcType in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
    • getValueConverter

      public org.hibernate.metamodel.model.convert.spi.BasicValueConverter<net.binis.codegen.objects.base.enumeration.CodeEnum,Object> getValueConverter()
      Specified by:
      getValueConverter in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
    • setParameterValues

      public void setParameterValues(Properties parameters)
      Specified by:
      setParameterValues in interface org.hibernate.usertype.ParameterizedType
    • getSqlType

      public int getSqlType()
      Specified by:
      getSqlType in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
    • returnedClass

      public Class<net.binis.codegen.objects.base.enumeration.CodeEnum> returnedClass()
      Specified by:
      returnedClass in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
    • equals

      public boolean equals(net.binis.codegen.objects.base.enumeration.CodeEnum x, net.binis.codegen.objects.base.enumeration.CodeEnum y) throws org.hibernate.HibernateException
      Specified by:
      equals in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
      Throws:
      org.hibernate.HibernateException
    • hashCode

      public int hashCode(net.binis.codegen.objects.base.enumeration.CodeEnum x) throws org.hibernate.HibernateException
      Specified by:
      hashCode in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
      Throws:
      org.hibernate.HibernateException
    • nullSafeGet

      public net.binis.codegen.objects.base.enumeration.CodeEnum nullSafeGet(ResultSet rs, int position, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws SQLException
      Specified by:
      nullSafeGet in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
      Throws:
      SQLException
    • nullSafeSet

      public void nullSafeSet(PreparedStatement st, net.binis.codegen.objects.base.enumeration.CodeEnum value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws org.hibernate.HibernateException, SQLException
      Specified by:
      nullSafeSet in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
      Throws:
      org.hibernate.HibernateException
      SQLException
    • deepCopy

      public net.binis.codegen.objects.base.enumeration.CodeEnum deepCopy(net.binis.codegen.objects.base.enumeration.CodeEnum value) throws org.hibernate.HibernateException
      Specified by:
      deepCopy in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
      Throws:
      org.hibernate.HibernateException
    • isMutable

      public boolean isMutable()
      Specified by:
      isMutable in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
    • disassemble

      public Serializable disassemble(net.binis.codegen.objects.base.enumeration.CodeEnum value) throws org.hibernate.HibernateException
      Specified by:
      disassemble in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
      Throws:
      org.hibernate.HibernateException
    • assemble

      public net.binis.codegen.objects.base.enumeration.CodeEnum assemble(Serializable cached, Object owner) throws org.hibernate.HibernateException
      Specified by:
      assemble in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
      Throws:
      org.hibernate.HibernateException
    • replace

      public net.binis.codegen.objects.base.enumeration.CodeEnum replace(net.binis.codegen.objects.base.enumeration.CodeEnum original, net.binis.codegen.objects.base.enumeration.CodeEnum target, Object owner) throws org.hibernate.HibernateException
      Specified by:
      replace in interface org.hibernate.usertype.UserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
      Throws:
      org.hibernate.HibernateException
    • getTypeConfiguration

      public org.hibernate.type.spi.TypeConfiguration getTypeConfiguration()
      Specified by:
      getTypeConfiguration in interface org.hibernate.type.spi.TypeConfigurationAware
    • setTypeConfiguration

      public void setTypeConfiguration(org.hibernate.type.spi.TypeConfiguration typeConfiguration)
      Specified by:
      setTypeConfiguration in interface org.hibernate.type.spi.TypeConfigurationAware
    • toSqlLiteral

      public String toSqlLiteral(net.binis.codegen.objects.base.enumeration.CodeEnum value)
      Specified by:
      toSqlLiteral in interface org.hibernate.usertype.EnhancedUserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
    • toString

      public String toString(net.binis.codegen.objects.base.enumeration.CodeEnum value)
      Specified by:
      toString in interface org.hibernate.usertype.EnhancedUserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
    • fromStringValue

      public net.binis.codegen.objects.base.enumeration.CodeEnum fromStringValue(CharSequence sequence)
      Specified by:
      fromStringValue in interface org.hibernate.usertype.EnhancedUserType<net.binis.codegen.objects.base.enumeration.CodeEnum>
    • toLoggableString

      public String toLoggableString(Object value, org.hibernate.engine.spi.SessionFactoryImplementor factory)
      Specified by:
      toLoggableString in interface org.hibernate.usertype.LoggableUserType
    • isOrdinal

      public boolean isOrdinal()