@Retention(value=RUNTIME) @Target(value=FIELD) @Documented public @interface Computed
//Normal column name
@Column(name = "first_name")
private String firstName;
//Write time of firstName
@Column
@Computed(function = "writetime", alias = "write_time", targetColumns = "first_name", cqlClass = Long.class)
private Long firstNameWriteTime;
In the above example, the field firstNameWriteTime is obtained by applying the function
writime on the column first_name.
The target CQL class is Long.
SELECT first_name, writetime(first_name) AS write_time ....
public abstract String function
public abstract String alias
public abstract String[] targetColumns
public abstract Class<?> cqlClass
Copyright © 2012-2021. All Rights Reserved.