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

ShortType

public class ShortType extends PrimitiveType implements DiscriminatorType, VersionType
short: A type that maps an SQL SMALLINT to a Java Short.
author
Gavin King

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

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

		return new Short( rs.getShort(name) );
	
public java.util.ComparatorgetComparator()

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


	   
		return ZERO;
	
public java.lang.StringgetName()

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

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

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

		return new Short( (short) ( ( (Short) current ).shortValue() + 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.setShort( index, ( (Short) value ).shortValue() );
	
public intsqlType()

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

		return new Short(xml);