Annotation Type ClusteringColumn


  • @Target({FIELD,METHOD})
    @Retention(RUNTIME)
    public @interface ClusteringColumn
    Annotates the field or getter of an 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.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int value
      The position of the clustering column.
    • Element Detail

      • value

        int value
        The position of the clustering column.

        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.

        Default:
        0