@Override public String[] getRegistrationKeys() { return new String[] { getName(), java.sql.Time.class.getName() }; }
public void nullSafeSet(PreparedStatement preparedStatement, Object value, int index) throws HibernateException, SQLException { if (value == null) { StandardBasicTypes.TIME.nullSafeSet(preparedStatement, null, index); } else { LocalTime lt = ((LocalTime) value); Time time = new Time(lt.getMillisOfDay()); StandardBasicTypes.TIME.nullSafeSet(preparedStatement, time, index); } }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object timestamp = StandardBasicTypes.TIME.nullSafeGet(resultSet, string); if (timestamp == null) { return null; } return new LocalTime(timestamp, DateTimeZone.UTC); }
public static final NullableType TIME = new TimeType();
public void nullSafeSet(PreparedStatement preparedStatement, Object value, int index) throws HibernateException, SQLException { if (value == null) { StandardBasicTypes.TIME.nullSafeSet(preparedStatement, null, index); } else { StandardBasicTypes.TIME.nullSafeSet(preparedStatement, new Time(((TimeOfDay) value).toDateTime(timeBase).getMillis()), index); } }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object date = StandardBasicTypes.TIME.nullSafeGet(resultSet, string); if (date == null) { return null; } return new TimeOfDay(date); }
@Override public String[] getRegistrationKeys() { return new String[] { getName(), java.sql.Time.class.getName() }; }
public void nullSafeSet(PreparedStatement preparedStatement, Object value, int index) throws HibernateException, SQLException { if (value == null) { StandardBasicTypes.TIME.nullSafeSet(preparedStatement, null, index); } else { LocalTime lt = ((LocalTime) value); Time time = new Time(lt.getMillisOfDay()); StandardBasicTypes.TIME.nullSafeSet(preparedStatement, time, index); } }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object date = StandardBasicTypes.TIME.nullSafeGet(resultSet, string); if (date == null) { return null; } return new TimeOfDay(date); }
@Override public String[] getRegistrationKeys() { return new String[] { getName(), java.sql.Time.class.getName() }; }
public void nullSafeSet(PreparedStatement preparedStatement, Object value, int index) throws HibernateException, SQLException { if (value == null) { StandardBasicTypes.TIME.nullSafeSet(preparedStatement, null, index); } else { StandardBasicTypes.TIME.nullSafeSet(preparedStatement, new Time(((TimeOfDay) value).toDateTime(timeBase).getMillis()), index); } }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object timestamp = StandardBasicTypes.TIME.nullSafeGet(resultSet, string); if (timestamp == null) { return null; } return new LocalTime(timestamp, DateTimeZone.UTC); }
registerHibernateType( Types.SMALLINT, StandardBasicTypes.SHORT.getName() ); registerHibernateType( Types.TINYINT, StandardBasicTypes.BYTE.getName() ); registerHibernateType( Types.TIME, StandardBasicTypes.TIME.getName() ); registerHibernateType( Types.TIMESTAMP, StandardBasicTypes.TIMESTAMP.getName() ); registerHibernateType( Types.VARCHAR, StandardBasicTypes.STRING.getName() );
break; case Types.TIME: typeName = TimeType.INSTANCE.getName(); break; case Types.TIMESTAMP:
break; case Types.TIME: typeName = TimeType.INSTANCE.getName(); break; case Types.TIMESTAMP:
break; case TIME: type = StandardBasicTypes.TIME.getName(); if ( !isDate ) { throw new NotYetImplementedException( "Calendar cannot persist TIME only" );
break; case TIME: type = StandardBasicTypes.TIME.getName(); if ( !isDate ) { throw new NotYetImplementedException( "Calendar cannot persist TIME only" );
registerHibernateType( Types.SMALLINT, StandardBasicTypes.SHORT.getName() ); registerHibernateType( Types.TINYINT, StandardBasicTypes.BYTE.getName() ); registerHibernateType( Types.TIME, StandardBasicTypes.TIME.getName() ); registerHibernateType( Types.TIMESTAMP, StandardBasicTypes.TIMESTAMP.getName() ); registerHibernateType( Types.VARCHAR, StandardBasicTypes.STRING.getName() );
registerHibernateType( Types.SMALLINT, StandardBasicTypes.SHORT.getName() ); registerHibernateType( Types.TINYINT, StandardBasicTypes.BYTE.getName() ); registerHibernateType( Types.TIME, StandardBasicTypes.TIME.getName() ); registerHibernateType( Types.TIMESTAMP, StandardBasicTypes.TIMESTAMP.getName() ); registerHibernateType( Types.VARCHAR, StandardBasicTypes.STRING.getName() );