Skip to content
This repository
  1. Entity: annotations for identify the family column name

  2. MappedSuperclass: For use inheritance in Easy-Cassandra. Use this annotation in Father’s class and the subclass allow persist the objects of the super class.

  3. Column: for identify the column in the Family Column, the classes can be used are:

    • java.lang.Boolean

    • java.util.Date

    • java.lang.Double

    • java.lang.Float

    • java.lang.Integer

    • java.lang.Long

    • java.lang.String

    • java.lang.Boolean

    • java.lang.Byte

    • java.lang.Short

    • java.lang.Character

  4. Embedded: The class with this is annotation has fields with ColumnValue inside itself, but the persistence way continues in the same Family of the Column. This annotation is to do the object’s modeling easily.

  5. Enumerated: for be used in Enums

  6. Index: The field with this annotation is an index secundary, can search and retrieve information from the row like KeyValue, need also use the ColumnValue together with this annotation.

  7. Id: The field with this annotation is a Key of the Row. If use the GeneratedValue will generate auto increment, each new Key in the FamilyColumn there are a new value auto numeric.

  8. Version: Is used for know the time that Object was persisted in Cassandra dataBase. It uses the timestamp in column, in other words, this annotation doesn’t persist nothing in Cassandra, but retrieves the timestamp from line. This annotation might be java.lang.Long, java.lang.String, java.util.Date, java.util.Calendar.

    • Simple example using annotations in a class with Easy-Cassandra: here

    • Annotations with enum here

    • Embedded classes here

    • Example with enum value and embedded class Here

    • Example annotations to Collections Here

Something went wrong with that request. Please try again.