@Target(value={FIELD,METHOD}) @Retention(value=RUNTIME) public @interface ClusteringColumn
Entity
property, to indicate that it's a clustering
column.
Example:
@ClusteringColumn private int month;This information is used by the mapper processor to generate default queries (for example a basic
Select
).
If there are multiple clustering columns, you must specify value()
to indicate the
position of each property:
@ClusteringColumn(1) private int month; @ClusteringColumn(2) private int day;If you don't specify positions, or if there are duplicates, the mapper processor will issue a compile-time error.
This annotation is mutually exclusive with PartitionKey
.
Modifier and Type | Optional Element and Description |
---|---|
int |
value
The position of the clustering column.
|
public abstract int value
This is only required if there are multiple clustering columns. Positions are not strictly required to be consecutive or start at a given index, but for clarity it is recommended to use consecutive integers.
Copyright © 2017–2021. All rights reserved.