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

LongType

public class LongType extends PrimitiveType implements DiscriminatorType, VersionType
long: A type that maps an SQL BIGINT to a Java Long.
author
Gavin King

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

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

		return new Long( rs.getLong(name) );
	
public java.util.ComparatorgetComparator()

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


	   
		return ZERO;
	
public java.lang.StringgetName()

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

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

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

		return new Long( ( (Long) current ).longValue() + 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.setLong( index, ( (Long) value ).longValue() );
	
public intsqlType()

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

		return new Long(xml);