private List<Object> bindPrimaryKey( Object primaryKey, PropertyMeta idMeta, boolean onlyStaticColumns) { List<Object> values = new ArrayList<>(); if (idMeta.structure().isEmbeddedId()) { values.addAll(idMeta.forTranscoding().encodeToComponents(primaryKey, onlyStaticColumns)); } else { values.add(idMeta.forTranscoding().encodeToCassandra(primaryKey)); } return values; }
private Object[] extractValuesForSimpleCounterBinding( EntityMeta entityMeta, PropertyMeta pm, Object primaryKey) { PropertyMeta idMeta = entityMeta.getIdMeta(); String fqcn = entityMeta.getClassName(); String primaryKeyAsString = idMeta.forTranscoding().forceEncodeToJSONForCounter(primaryKey); String cql3ColumnName = pm.getCQL3ColumnName(); return new Object[] {fqcn, primaryKeyAsString, cql3ColumnName}; }
private List<Object> fetchPropertiesValues(List<PropertyMeta> pms, Object entity) { List<Object> values = new ArrayList<>(); for (PropertyMeta pm : pms) { Object value = pm.forTranscoding().getAndEncodeValueForCassandra(entity); values.add(value); } return values; }