java.lang.Object
io.hypersistence.utils.hibernate.type.ImmutableType<T>
io.hypersistence.utils.hibernate.type.DescriptorImmutableType<Year,org.hibernate.type.descriptor.jdbc.SmallIntJdbcType,YearTypeDescriptor>
io.hypersistence.utils.hibernate.type.basic.YearType
All Implemented Interfaces:
Serializable, org.hibernate.query.BindableType<Year>, org.hibernate.query.sqm.SqmExpressible<Year>, org.hibernate.type.Type, org.hibernate.usertype.EnhancedUserType<Year>, org.hibernate.usertype.UserType<Year>

public class YearType extends DescriptorImmutableType<Year,org.hibernate.type.descriptor.jdbc.SmallIntJdbcType,YearTypeDescriptor>
Maps a Java Year object to an INT column type.

For more details about how to use it, check out this article on vladmihalcea.com.

Author:
Vlad Mihalcea
See Also:
  • Field Details

    • INSTANCE

      public static final YearType INSTANCE
  • Constructor Details

    • YearType

      public YearType()
    • YearType

      public YearType(Configuration configuration)
    • YearType

      public YearType(org.hibernate.type.spi.TypeBootstrapContext typeBootstrapContext)
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.hibernate.type.Type
      Overrides:
      getName in class ImmutableType<Year>
    • fromStringValue

      public Year fromStringValue(CharSequence charSequence) throws org.hibernate.HibernateException
      Throws:
      org.hibernate.HibernateException