public class

ByteType

extends AbstractSingleColumnStandardBasicType<T>
implements DiscriminatorType<T> PrimitiveType<T> VersionType<T>
java.lang.Object
   ↳ org.hibernate.type.AbstractStandardBasicType<T>
     ↳ org.hibernate.type.AbstractSingleColumnStandardBasicType<T>
       ↳ org.hibernate.type.ByteType

Class Overview

A type that maps between TINYINT and Byte

Summary

Fields
public static final ByteType INSTANCE
Public Constructors
ByteType()
Public Methods
Byte fromStringValue(String xml)
Consume the given string representation back into this types java form.
Comparator<Byte> getComparator()
Get a comparator for version values.
Serializable getDefaultValue()
Get this type's default value.
String getName()
Returns the abbreviated name of the type.
Class getPrimitiveClass()
Retrieve the primitive counterpart to the wrapper type identified by getReturnedClass().
String[] getRegistrationKeys()
Get the names under which this type should be registered in the type registry.
Byte next(Byte current, SessionImplementor session)
String objectToSQLString(Byte value, Dialect dialect)
Byte seed(SessionImplementor session)
Generate an initial version.
Byte stringToObject(String xml)
Convert the value from the mapping file to a Java object.
[Expand]
Inherited Methods
From class org.hibernate.type.AbstractSingleColumnStandardBasicType
From class org.hibernate.type.AbstractStandardBasicType
From class java.lang.Object
From interface org.hibernate.type.BasicType
From interface org.hibernate.type.IdentifierType
From interface org.hibernate.type.LiteralType
From interface org.hibernate.type.PrimitiveType
From interface org.hibernate.type.SingleColumnType
From interface org.hibernate.type.StringRepresentableType
From interface org.hibernate.type.Type
From interface org.hibernate.type.VersionType
From interface org.hibernate.type.XmlRepresentableType

Fields

public static final ByteType INSTANCE

Public Constructors

public ByteType ()

Public Methods

public Byte fromStringValue (String xml)

Consume the given string representation back into this types java form.

Parameters
xml The string representation to be consumed.
Returns
  • The java type representation

public Comparator<Byte> getComparator ()

Get a comparator for version values.

Returns
  • The comparator to use to compare different version values.

public Serializable getDefaultValue ()

Get this type's default value.

Returns
  • The default value.

public String getName ()

Returns the abbreviated name of the type.

Returns
  • String the Hibernate type name

public Class getPrimitiveClass ()

Retrieve the primitive counterpart to the wrapper type identified by getReturnedClass().

Returns
  • The primitive Java type.

public String[] getRegistrationKeys ()

Get the names under which this type should be registered in the type registry.

Returns
  • The keys under which to register this type.

public Byte next (Byte current, SessionImplementor session)

public String objectToSQLString (Byte value, Dialect dialect)

public Byte seed (SessionImplementor session)

Generate an initial version.

Parameters
session The session from which this request originates.
Returns
  • an instance of the type

public Byte stringToObject (String xml)

Convert the value from the mapping file to a Java object.

Parameters
xml the value of discriminator-value or unsaved-value attribute
Returns
  • The converted value of the string representation.