com.datastax.driver.mapping.annotations

## Annotation Type Computed

• @Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface Computed
Annotates a "computed" field, which gets filled from a CQL expression in the SELECT query used to retrieve an entity.

Note that such fields are only filled by default mapper operations (Mapper.get(Object...)), they will be ignored in accessor queries and save operations.

As opposed to other mapper annotation, this one doesn't handle case sensitivity. If your expression contains case-sensitive names, you'll need to quote them explicitly:

  @Computed("\"caseSensitiveFunction\"(v)")

• ### Required Element Summary

Required Elements
Modifier and Type Required Element and Description
String value
The formula used to compute the field.
• ### Element Detail

• #### value

public abstract String value
The formula used to compute the field.

This is a CQL expression like you would use directly in a query, for instance "writetime(v)".

Returns:
the formula.