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

IntegerType

public class IntegerType extends PrimitiveType implements DiscriminatorType, VersionType
integer: A type that maps an SQL INT to a Java Integer.
author
Gavin King

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

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

		return new Integer( rs.getInt(name) );
	
public java.util.ComparatorgetComparator()

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


	   
		return ZERO;
	
public java.lang.StringgetName()

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

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

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

		return new Integer( ( (Integer) current ).intValue() + 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.setInt( index, ( (Integer) value ).intValue() );
	
public intsqlType()

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

		return new Integer(xml);