@Override public final TableField<R, ?> getRecordTimestamp() { return alias.wrapped().getRecordTimestamp(); }
/** * Set an updated timestamp value to a store query */ private final Timestamp addRecordTimestamp(StoreQuery<?> store) { Timestamp result = null; if (isTimestampOrVersionAvailable()) { TableField<R, ? extends java.util.Date> timestamp = getTable().getRecordTimestamp(); if (timestamp != null) { // Use Timestamp locally, to provide maximum precision result = new Timestamp(System.currentTimeMillis()); addValue(store, timestamp, result); } } return result; }
final boolean isTimestampOrVersionAvailable() { return getTable().getRecordTimestamp() != null || getTable().getRecordVersion() != null; }
private final boolean isTimestampOrVersionAvailable() { return getTable().getRecordTimestamp() != null || getTable().getRecordVersion() != null; }
/** * Set an updated timestamp value to a store query */ final Timestamp addRecordTimestamp(StoreQuery<?> store) { Timestamp result = null; if (isTimestampOrVersionAvailable()) { TableField<R, ?> timestamp = getTable().getRecordTimestamp(); if (timestamp != null) { // Use Timestamp locally, to provide maximum precision result = new Timestamp(configuration().clock().millis()); addValue(store, timestamp, result); } } return result; }
@SuppressWarnings("deprecation") private final void addConditionForVersionAndTimestamp(org.jooq.ConditionProvider query) { TableField<R, ?> v = getTable().getRecordVersion(); TableField<R, ?> t = getTable().getRecordTimestamp(); if (v != null) Tools.addCondition(query, this, v); if (t != null) Tools.addCondition(query, this, t); }
@SuppressWarnings("deprecation") private final void addConditionForVersionAndTimestamp(org.jooq.ConditionProvider query) { TableField<R, ?> v = getTable().getRecordVersion(); TableField<R, ?> t = getTable().getRecordTimestamp(); if (v != null) Utils.addCondition(query, this, v); if (t != null) Utils.addCondition(query, this, t); }
/** * Set a generated version and timestamp value onto this record after * successfully storing the record. */ final void setRecordVersionAndTimestamp(BigInteger version, Timestamp timestamp) { if (version != null) { TableField<R, ?> field = getTable().getRecordVersion(); int fieldIndex = indexOrFail(fieldsRow(), field); Object value = field.getDataType().convert(version); values[fieldIndex] = value; originals[fieldIndex] = value; changed.clear(fieldIndex); } if (timestamp != null) { TableField<R, ?> field = getTable().getRecordTimestamp(); int fieldIndex = indexOrFail(fieldsRow(), field); Object value = field.getDataType().convert(timestamp); values[fieldIndex] = value; originals[fieldIndex] = value; changed.clear(fieldIndex); } }
/** * Set a generated version and timestamp value onto this record after * successfully storing the record. */ private final void setRecordVersionAndTimestamp(BigInteger version, Timestamp timestamp) { if (version != null) { TableField<R, ?> field = getTable().getRecordVersion(); setValue(field, new Value<Object>(field.getDataType().convert(version))); } if (timestamp != null) { TableField<R, ?> field = getTable().getRecordTimestamp(); setValue(field, new Value<Object>(field.getDataType().convert(timestamp))); } } }