CasquatchDao is your main interface to the database and provides an extensive api. This can be configured through a Builder, Autowired with Spring, or loaded through a configuration file.
The CasquatchEntity corresponds directly to a table. Fields and naming are translated through CasquatchNamingConvention to CQL equivalents. At minimum an entity will look like the following:
@CasquatchEntity
@Getter @Setter @NoArgsConstructor
public class TableName extends AbstractCasquatchEntity {
@PartitionKey
private Integer keyOne;
@ClusteringColumn(1)
private Integer keyTwo;
private String colOne;
private String colTwo;
}
The entity must contain @CasquatchEntity, a field annotated with @PartitionKey, Setters for each field, and a No Args Constructor.
Each entity annotation with @CasquatchEntity creates an implementation of AbstractStatementFactory to provide the generation of appropriate prepared statements as well as the mappings between the statements and the objects.