@Retention(value=RUNTIME) @Target(value=FIELD) @Documented public @interface ClusteringColumn
@Table
public class Entity {
// Partition key component
@PartitionKey
private Long userId;
// Clustering column 1. Date in YYYYMMDD
@ClusteringColumn(1)
private int date;
// Clustering column 2. type
@ClusteringColumn(2)
private String type;
}
public abstract int value
public abstract boolean asc
@Table
public class Entity {
// Partition key
@PartitionKey
private Long userId;
// Ascending clustering column. "asc" can be omitted because defaults to "true"
@ClusteringColumn(value = 1, asc = true)
private UUID time;
// Descending clustering column.
@ClusteringColumn(value = 2, asc = false)
private int type;
}
Copyright © 2012-2021. All Rights Reserved.