public Object get(ResultSet rs, String name) throws HibernateException, SQLException { return mutableType.get(rs, name); }
public Object get(ResultSet rs, String name) throws HibernateException, SQLException { byte[] bytes = (byte[]) Hibernate.BINARY.get(rs, name); // Some JDBC drivers erroneously return an empty array here for a null DB value :/ if ( bytes == null || bytes.length == 0 ) { return null; } else { return fromBytes(bytes); } }
public Object nullSafeGet( ResultSet rs, String[] names, Object owner ) throws HibernateException, SQLException { Object identifier = type.get( rs, names[0] ); if ( rs.wasNull() ) { return null; } try { return valueOfMethod.invoke( enumClass, new Object[]{identifier} ); } catch ( Exception e ) { throw new HibernateException( "Exception while invoking valueOf method '" + valueOfMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e ); } }
@Override public Object nullSafeGet( ResultSet rs, String[] names, Object owner ) throws HibernateException, SQLException { Object identifier = type.get( rs, names[0] ); if ( rs.wasNull() ) { return null; } try { return valueOfMethod.invoke( enumClass, new Object[]{identifier} ); } catch ( Exception e ) { throw new HibernateException( "Exception while invoking valueOf method '" + valueOfMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e ); } }
public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException { Object identifier = type.get(rs, names[0]); if (rs.wasNull()) { return null; } try { return valueOfMethod.invoke(enumClass, new Object[] { identifier }); } catch (Exception e) { throw new HibernateException("Exception while invoking valueOf method '" + valueOfMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e); } }
public Object nullSafeGet( ResultSet rs, String[] names, Object owner ) throws HibernateException, SQLException { Object identifier = type.get( rs, names[0] ); if ( rs.wasNull() ) { return null; } try { return valueOfMethod.invoke( enumClass, new Object[]{identifier} ); } catch ( Exception e ) { throw new HibernateException( "Exception while invoking valueOf method '" + valueOfMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e ); } }
public Object get(ResultSet rs, String name) throws HibernateException, SQLException { byte[] bytes = (byte[]) Hibernate.BINARY.get(rs, name); if ( bytes==null ) { return null; } else { return fromBytes(bytes); } }
public final Object nullSafeGet(ResultSet rs, String name) throws HibernateException, SQLException { Object value = get(rs, name); if ( value==null || rs.wasNull() ) { if (IS_TRACE_ENABLED) { LogFactory.getLog( getClass() ).trace("returning null as column: " + name); } return null; } else { if (IS_TRACE_ENABLED) { LogFactory.getLog( getClass() ).trace( "returning '" + toString(value) + "' as column: " + name); } return value; } }
public Object get(ResultSet rs, String name) throws HibernateException, SQLException { return fromStringValue( (String) Hibernate.STRING.get(rs, name) ); }
public Object get(ResultSet rs, String name) throws HibernateException, SQLException { return fromStringValue( (String) Hibernate.STRING.get(rs, name) ); }
public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws SQLException { Object identifier = type.get(rs, names[0]); if (identifier == null) { return null; } try { return valueOfMethod.invoke(enumClass, new Object[] { identifier }); } catch (Exception e) { throw new HibernateException("Exception while invoking valueOf method '" + valueOfMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e); } }
public Object get(ResultSet rs, String name) throws HibernateException, SQLException { String str = (String) Hibernate.STRING.get(rs, name); if (str == null) { return null; } else { try { return ReflectHelper.classForName(str); } catch (ClassNotFoundException cnfe) { throw new HibernateException("Class not found: " + str); } } }
public Object get(ResultSet rs, String name) throws HibernateException, SQLException { String str = (String) Hibernate.STRING.get(rs, name); if (str == null) { return null; } else { try { return ReflectHelper.classForName(str); } catch (ClassNotFoundException cnfe) { throw new HibernateException("Class not found: " + str); } } }
public final Object nullSafeGet(ResultSet rs, String name) throws HibernateException, SQLException { try { Object value = get(rs, name); if ( value == null || rs.wasNull() ) { if ( IS_TRACE_ENABLED ) { log().trace( "returning null as column: " + name ); } return null; } else { if (IS_TRACE_ENABLED) { log().trace( "returning '" + toString( value ) + "' as column: " + name ); } return value; } } catch ( RuntimeException re ) { log().info( "could not read column value from result set: " + name + "; " + re.getMessage() ); throw re; } catch ( SQLException se ) { log().info( "could not read column value from result set: " + name + "; " + se.getMessage() ); throw se; } }
public final Object nullSafeGet(ResultSet rs, String name) throws HibernateException, SQLException { try { Object value = get(rs, name); if ( value == null || rs.wasNull() ) { LOG.tracev( "Returning null as column {0}", name ); return null; } if ( LOG.isTraceEnabled() ) LOG.trace( "Returning '" + toString( value ) + "' as column " + name ); return value; } catch ( RuntimeException re ) { LOG.unableToReadColumnValueFromResultSet( name, re.getMessage() ); throw re; } catch ( SQLException se ) { LOG.unableToReadColumnValueFromResultSet( name, se.getMessage() ); throw se; } }
public final Object nullSafeGet(ResultSet rs, String name) throws HibernateException, SQLException { try { Object value = get(rs, name); if ( value == null || rs.wasNull() ) { LOG.tracev( "Returning null as column {0}", name ); return null; } if ( LOG.isTraceEnabled() ) LOG.trace( "Returning '" + toString( value ) + "' as column " + name ); return value; } catch ( RuntimeException re ) { LOG.unableToReadColumnValueFromResultSet( name, re.getMessage() ); throw re; } catch ( SQLException se ) { LOG.unableToReadColumnValueFromResultSet( name, se.getMessage() ); throw se; } }
Object identifier = type.get(rs, names[0]); if (rs.wasNull()) { return null;
Object identifier = type.get(rs, names[0]); if (rs.wasNull()) { return null;