Package com.arangodb.model
Class ComputedValue
- java.lang.Object
-
- com.arangodb.model.ComputedValue
-
public final class ComputedValue extends Object
- Since:
- ArangoDB 3.10
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ComputedValue.ComputeOn
-
Constructor Summary
Constructors Constructor Description ComputedValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputedValue
computeOn(ComputedValue.ComputeOn... computeOn)
boolean
equals(Object o)
ComputedValue
expression(String expression)
ComputedValue
failOnWarning(Boolean failOnWarning)
Set<ComputedValue.ComputeOn>
getComputeOn()
String
getExpression()
Boolean
getFailOnWarning()
Boolean
getKeepNull()
String
getName()
Boolean
getOverwrite()
int
hashCode()
ComputedValue
keepNull(Boolean keepNull)
ComputedValue
name(String name)
ComputedValue
overwrite(Boolean overwrite)
-
-
-
Method Detail
-
name
public ComputedValue name(String name)
- Parameters:
name
- (required) The name of the target attribute. Can only be a top-level attribute, but you may return a nested object. Cannot be _key, _id, _rev, _from, _to, or a shard key attribute.- Returns:
- this
-
expression
public ComputedValue expression(String expression)
- Parameters:
expression
- (required) An AQL RETURN operation with an expression that computes the desired value. See Computed Value Expressions for details.- Returns:
- this
-
overwrite
public ComputedValue overwrite(Boolean overwrite)
- Parameters:
overwrite
- (required) Whether the computed value shall take precedence over a user-provided or existing attribute.- Returns:
- this
-
computeOn
public ComputedValue computeOn(ComputedValue.ComputeOn... computeOn)
- Parameters:
computeOn
- (optional) An array of operations to define on which write operations the value shall be computed. The default is ["insert", "update", "replace"].- Returns:
- this
-
keepNull
public ComputedValue keepNull(Boolean keepNull)
- Parameters:
keepNull
- (optional) Whether the target attribute shall be set if the expression evaluates to null. You can set the option to false to not set (or unset) the target attribute if the expression returns null. The default is true.- Returns:
- this
-
failOnWarning
public ComputedValue failOnWarning(Boolean failOnWarning)
- Parameters:
failOnWarning
- (optional) Whether to let the write operation fail if the expression produces a warning. The default is false.- Returns:
- this
-
getName
public String getName()
-
getExpression
public String getExpression()
-
getOverwrite
public Boolean getOverwrite()
-
getComputeOn
public Set<ComputedValue.ComputeOn> getComputeOn()
-
getKeepNull
public Boolean getKeepNull()
-
getFailOnWarning
public Boolean getFailOnWarning()
-
-