Class ComputedValue

java.lang.Object
com.arangodb.model.ComputedValue

public final class ComputedValue extends Object
Since:
ArangoDB 3.10
  • Constructor Details

    • ComputedValue

      public ComputedValue()
  • Method Details

    • 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()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object