public final Object[] get() throws HibernateException { return getCurrentRow(); }
public final Double getDouble(int col) throws HibernateException { return (Double) getFinal(col, Hibernate.DOUBLE); }
public final Blob getBlob(int col) throws HibernateException { return (Blob) getNonFinal(col, Hibernate.BLOB); }
/** * Check that the requested type is compatible with the result type, and * return the column value. This version makes sure the the classes * are "assignable". * * @param col the column * @param returnType any type */ protected final Object getNonFinal(int col, Type returnType) throws HibernateException { if ( holderInstantiator!=null ) { throw new HibernateException("query specifies a holder class"); } if ( returnType.getReturnedClass().isAssignableFrom( types[col].getReturnedClass() ) ) { return get(col); } else { return throwInvalidColumnTypeException(col, types[col], returnType); } }
/** * Check that the requested type is compatible with the result type, and * return the column value. This version makes sure the the classes * are identical. * * @param col the column * @param returnType a "final" type */ protected final Object getFinal(int col, Type returnType) throws HibernateException { if ( holderInstantiator!=null ) { throw new HibernateException("query specifies a holder class"); } if ( returnType.getReturnedClass()==types[col].getReturnedClass() ) { return get(col); } else { return throwInvalidColumnTypeException(col, types[col], returnType); } }
public final BigInteger getBigInteger(int col) throws HibernateException { return (BigInteger) getFinal(col, Hibernate.BIG_INTEGER); }
public final Calendar getCalendar(int col) throws HibernateException { return (Calendar) getNonFinal(col, Hibernate.CALENDAR); }
public final Object get(int col) throws HibernateException { return getCurrentRow()[col]; }
public final Float getFloat(int col) throws HibernateException { return (Float) getFinal(col, Hibernate.FLOAT); }
public final Clob getClob(int col) throws HibernateException { return (Clob) getNonFinal(col, Hibernate.CLOB); }
public final Character getCharacter(int col) throws HibernateException { return (Character) getFinal(col, Hibernate.CHARACTER); }
public final TimeZone getTimeZone(int col) throws HibernateException { return (TimeZone) getNonFinal(col, Hibernate.TIMEZONE); }
public final Integer getInteger(int col) throws HibernateException { return (Integer) getFinal(col, Hibernate.INTEGER); }
public final Date getDate(int col) throws HibernateException { return (Date) getNonFinal(col, Hibernate.TIMESTAMP); }
public final byte[] getBinary(int col) throws HibernateException { return (byte[]) getFinal(col, Hibernate.BINARY); }
public final Byte getByte(int col) throws HibernateException { return (Byte) getFinal(col, Hibernate.BYTE); }
public final Short getShort(int col) throws HibernateException { return (Short) getFinal(col, Hibernate.SHORT); }
public final String getString(int col) throws HibernateException { return (String) getFinal(col, Hibernate.STRING); }
public final BigDecimal getBigDecimal(int col) throws HibernateException { return (BigDecimal) getFinal(col, Hibernate.BIG_DECIMAL); }
public final String getText(int col) throws HibernateException { return (String) getFinal(col, Hibernate.TEXT); }