@Override public Object getObject() { return getTimestamp(); }
@Override public void set(PreparedStatement prep, int parameterIndex) throws SQLException { prep.setTimestamp(parameterIndex, getTimestamp()); }
private long getTime(Value value) { int type; type = value.getType(); switch (type) { case Value.DATE: case Value.TIME: case Value.TIMESTAMP: ValueTimestamp v = (ValueTimestamp) value.convertTo(Value.TIMESTAMP); return v.getTimestamp().getTime(); default: throw new RuleEvaluateException("Invalid type for " + getClass().getName()); } } }
case Value.TIMESTAMP: ValueTimestamp v = (ValueTimestamp) value.convertTo(Value.TIMESTAMP); long toLong = v.getTimestamp().getTime(); return partitionUtil.partition(toLong); case Value.STRING:
case Value.TIMESTAMP: ValueTimestamp v = (ValueTimestamp) value.convertTo(Value.TIMESTAMP); long toLong = v.getTimestamp().getTime(); bytes = ValueLong.get(toLong).getBytes(); break;