public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { String first = StringType.INSTANCE.nullSafeGet( rs, names[0], session ); String second = StringType.INSTANCE.nullSafeGet( rs, names[1], session ); return ( first == null && second == null ) ? null : new String[] {first, second}; }
public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { return StringType.INSTANCE.nullSafeGet( rs, names[0], session ); }
@Override public Object nullSafeGet(ResultSet resultSet, String[] names, SharedSessionContractImplementor sessionImplementor, Object o) throws HibernateException, SQLException { String val = (String) StandardBasicTypes.STRING.nullSafeGet(resultSet, names[0], sessionImplementor, o); return val == null ? null : val.trim(); }
private String getString(ResultSet rs, String name, SessionImplementor session, Object owner) throws HibernateException, SQLException { return (String) StandardBasicTypes.STRING.nullSafeGet(rs, name, session, owner); }
@Override public Object nullSafeGet(ResultSet resultSet, String[] names, SharedSessionContractImplementor sessionImplementor, Object o) throws HibernateException, SQLException { String val = (String) StandardBasicTypes.STRING.nullSafeGet(resultSet, names[0], sessionImplementor, o); return val == null ? null : val.trim(); }
@Override public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { String value = (String) delegateType.nullSafeGet( rs, names, session, owner ); if ( value == null ) { return null; } else { return new ISBN( value ); } }
public Object nullSafeGet(ResultSet resultSet, String[] strings, Object object) throws HibernateException, SQLException { Object timestamp = StandardBasicTypes.TIMESTAMP.nullSafeGet(resultSet, strings[0]); Object timezone = StandardBasicTypes.STRING.nullSafeGet(resultSet, strings[1]); if (timestamp == null || timezone == null) { return null; } return new DateTime(timestamp, DateTimeZone.forID(timezone.toString())); }
public Object nullSafeGet(ResultSet resultSet, String[] strings, Object object) throws HibernateException, SQLException { String s = (String) StandardBasicTypes.STRING.nullSafeGet(resultSet, strings[0]); if (s == null) { return null; } return fromNonNullString(s); }
@Override public Object nullSafeGet(final ResultSet rs, final String[] names, final Object owner) throws HibernateException, SQLException { return InetAddressUtils.addr((String)StringType.INSTANCE.nullSafeGet(rs, names[0])); }
@Override public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor sharedSessionContractImplementor, Object owner) throws HibernateException, SQLException { Timestamp timestamp = (Timestamp) StandardBasicTypes.TIMESTAMP.nullSafeGet(rs, names[0], sharedSessionContractImplementor, owner); String timezone = (String) StandardBasicTypes.STRING.nullSafeGet(rs, names[1], sharedSessionContractImplementor, owner); if (timestamp == null || timezone == null) return null; else return new DateTime(timestamp, DateTimeZone.forID(timezone)); }
@Override public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { String value = StringType.INSTANCE.nullSafeGet(rs, names[0], session); if (isOracle(session) && value != null) { value = value.substring(1); } return value; }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object timestamp = StandardBasicTypes.STRING.nullSafeGet(resultSet, string); if (timestamp == null) { return null; } return new LocalTime(timestamp.toString()); }
public Object nullSafeGet(ResultSet resultSet, String[] strings, Object object) throws HibernateException, SQLException { String s = (String) StandardBasicTypes.STRING.nullSafeGet(resultSet, strings[0]); if (s == null) { return null; } return fromNonNullString(s); }
@Override public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { String val = (String) StringType.INSTANCE.nullSafeGet(rs, names[0], session, owner); return new Blob(val); }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object timestamp = StandardBasicTypes.STRING.nullSafeGet(resultSet, string); if (timestamp == null) { return null; } return new LocalTime(timestamp.toString()); }
public Object nullSafeGet(ResultSet resultSet, String[] strings, Object object) throws HibernateException, SQLException { Object timestamp = StandardBasicTypes.TIMESTAMP.nullSafeGet(resultSet, strings[0]); Object timezone = StandardBasicTypes.STRING.nullSafeGet(resultSet, strings[1]); if (timestamp == null || timezone == null) { return null; } return new DateTime(timestamp, DateTimeZone.forID(timezone.toString())); }
public Object nullSafeGet( final ResultSet arg0, final String[] arg1, final Object arg2 ) throws HibernateException, SQLException { if ( EmptyStringUserType.debug ) { EmptyStringUserType.log.debug( Messages.getInstance().getString( "EMPTYSTRTYPE.DEBUG_NULL_SAFE_GET" ) ); //$NON-NLS-1$ } String colValue = (String) Hibernate.STRING.nullSafeGet( arg0, arg1[0] ); // _PENTAHOEMPTY_ shouldn't appear in the wild. So, check the string in // the DB for this flag, // and if it's there, then this must be an empty string. return ( ( colValue != null ) ? ( colValue.equals( EmptyStringUserType.PENTAHOEMPTY ) ? "" : colValue ) : null ); //$NON-NLS-1$ }
@Override public Object nullSafeGet(ResultSet resultSet, String[] strings, SharedSessionContractImplementor sharedSessionContractImplementor, Object o) throws HibernateException, SQLException { try { // TODO - Revisar!! String val = (String)StandardBasicTypes.STRING.nullSafeGet(resultSet, strings[0], sharedSessionContractImplementor); TypeAdaptor ta = (TypeAdaptor)clazz.newInstance(); ta.fromString(val); return ta; } catch (Exception e) { throw new HibernateException(e); } }
@Override public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { BigDecimal amount = BigDecimalType.INSTANCE.nullSafeGet(rs, names[0], session); String currencyCode = StringType.INSTANCE.nullSafeGet(rs, names[1], session); return amount == null && currencyCode == null ? null : Money.of(CurrencyUnit.getInstance(currencyCode), amount); }
@Override public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { String persistedValue = (String) StringType.INSTANCE.nullSafeGet(rs, names[0], session); if (StringUtils.isEmpty(persistedValue)) { if (isConvertNullsToEmptyObjects()) return new ReflectionUtil().invokeConstructor(returnedClass()); else return null; } return hydrate(readFromDatabase(persistedValue)); }