/** * Returns the value of the specified column as a java.sql.Date using a * specified time zone. * * @param columnIndex (1,2,...) * @param calendar the calendar * @return the value * @throws SQLException if the column is not found or if the result set is * closed */ @Override public Date getDate(int columnIndex, Calendar calendar) throws SQLException { try { if (isDebugEnabled()) { debugCode("getDate(" + columnIndex + ", calendar)"); } return DateTimeUtils.convertDate(get(columnIndex), calendar); } catch (Exception e) { throw logAndConvert(e); } }
/** * Returns the value of the specified column as a java.sql.Date using a * specified time zone. * * @param columnLabel the column label * @param calendar the calendar * @return the value * @throws SQLException if the column is not found or if the result set is * closed */ @Override public Date getDate(String columnLabel, Calendar calendar) throws SQLException { try { if (isDebugEnabled()) { debugCode("getDate(" + StringUtils.quoteJavaString(columnLabel) + ", calendar)"); } return DateTimeUtils.convertDate(get(columnLabel), calendar); } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the date using a specified time zone. The value will be converted to * the local time zone. * * @param parameterIndex the parameter index (1, 2, ...) * @param x the value * @param calendar the calendar * @throws SQLException if this object is closed */ @Override public void setDate(int parameterIndex, java.sql.Date x, Calendar calendar) throws SQLException { try { if (isDebugEnabled()) { debugCode("setDate(" + parameterIndex + ", " + quoteDate(x) + ", calendar);"); } if (x == null) { setParameter(parameterIndex, ValueNull.INSTANCE); } else { setParameter(parameterIndex, DateTimeUtils.convertDate(x, calendar)); } } catch (Exception e) { throw logAndConvert(e); } }