@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD,PARAMETER})
public @interface FaunaField
Maps a field, getter, or constructor parameter to an object field in FaunaDB when encoding or decoding an object.
class Car {
@FaunaField("model")
private String model;
@FaunaField("manufacturer")
private String manufacturer;
}
class Product {
private String description;
private double price;
@FaunaConstructor
public Product(@FaunaField("description") String description, @FaunaField("price") double price) {
this.description = description;
this.price = price;
}
}
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
value |