FileDocCategorySizeDatePackage
ByteType.javaAPI DocHibernate 3.2.51741Wed Aug 10 15:23:56 BST 2005org.hibernate.type

ByteType

public class ByteType extends PrimitiveType implements DiscriminatorType, VersionType
byte: A type that maps an SQL TINYINT to a Java Byte.
author
Gavin King

Fields Summary
private static final Byte
ZERO
Constructors Summary
Methods Summary
public java.lang.ObjectfromStringValue(java.lang.String xml)

		return new Byte(xml);
	
public java.lang.Objectget(java.sql.ResultSet rs, java.lang.String name)

		return new Byte( rs.getByte(name) );
	
public java.util.ComparatorgetComparator()

		return ComparableComparator.INSTANCE;
	
public java.io.SerializablegetDefaultValue()


	   
		return ZERO;
	
public java.lang.StringgetName()

 return "byte"; 
public java.lang.ClassgetPrimitiveClass()

		return byte.class;
	
public java.lang.ClassgetReturnedClass()

		return Byte.class;
	
public java.lang.Objectnext(java.lang.Object current, org.hibernate.engine.SessionImplementor session)

		return new Byte( (byte) ( ( (Byte) current ).byteValue() + 1 ) );
	
public java.lang.StringobjectToSQLString(java.lang.Object value, org.hibernate.dialect.Dialect dialect)

		return value.toString();
	
public java.lang.Objectseed(org.hibernate.engine.SessionImplementor session)

		return ZERO;
	
public voidset(java.sql.PreparedStatement st, java.lang.Object value, int index)

		st.setByte( index, ( (Byte) value ).byteValue() );
	
public intsqlType()

		return Types.TINYINT;
	
public java.lang.ObjectstringToObject(java.lang.String xml)

		return new Byte(xml);