final CassandraColumnName column,
final Long version,
final ByteBuffer value,
final Integer ttl
) {
final Insert insert = insertInto(table.getKeyspace(), table.getTable());
for (Map.Entry<String, Object> component
: getEntityIdColumnValues(layout, entityId).entrySet()) {
insert.value(component.getKey(), component.getValue());
}
insert
.value(FAMILY_COL, column.getFamilyBuffer())
.value(QUALIFIER_COL, column.getQualifierBuffer())
.value(VERSION_COL, version)
.value(VALUE_COL, value);
if (ttl != null && ttl < 630720000) { // 630720000 is the maximum Cassandra TTL
insert.using(ttl(ttl));
}
return insert;
}