Annotation Interface PrimaryKey


Identifies the primary key field of the entity, which may be of a basic type or of a type that represents a composite primary key class. This field corresponds to the PRIMARY KEY of the corresponding Cassandra table. Only one field in a given type hierarchy may be annotated with this annotation.

Remember, if the Cassandra table has multiple primary key columns, then you must define a class annotated with PrimaryKeyClass to represent the primary key!

Use PrimaryKeyColumn in conjunction with Id to specify extended primary key column properties.

Author:
Alex Shvid, Matthew T. Adams, Mark Paluch
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The column name for the primary key if it is of a simple type, else ignored.