@Override public void write(DataBuffer buff, Object obj) { Time t = (Time) obj; writeValue(buff, ValueTime.get(t)); }
/** * Updates a column in the current or insert row. * * @param columnIndex (1,2,...) * @param x the value * @throws SQLException if the result set is closed or not updatable */ @Override public void updateTime(int columnIndex, Time x) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateTime(" + columnIndex + ", x);"); } update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x)); } catch (Exception e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnLabel the column label * @param x the value * @throws SQLException if the result set is closed or not updatable */ @Override public void updateTime(String columnLabel, Time x) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateTime(" + quote(columnLabel) + ", x);"); } update(columnLabel, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x)); } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the value of a parameter. * * @param parameterIndex the parameter index (1, 2, ...) * @param x the value * @throws SQLException if this object is closed */ @Override public void setTime(int parameterIndex, java.sql.Time x) throws SQLException { try { if (isDebugEnabled()) { debugCode("setTime(" + parameterIndex + ", " + quoteTime(x) + ");"); } Value v = x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x); setParameter(parameterIndex, v); } catch (Exception e) { throw logAndConvert(e); } }
v = value == null ? (Value) ValueNull.INSTANCE : ValueTime.get(value); break;
return ValueDate.get((Date) x); } else if (x instanceof Time) { return ValueTime.get((Time) x); } else if (x instanceof Timestamp) { return ValueTimestamp.get((Timestamp) x);
long now = session.getTransactionStart(); result = ValueTime.get(new Time(now)); break;