Interface ComputedField<F extends ComputedField<F>>

All Superinterfaces:
Comparable<F>, Component<F>, Copyable<F>, Field<F>, FormComponent<F>, Serializable
All Known Implementing Classes:
DefaultComputedField

public interface ComputedField<F extends ComputedField<F>> extends Field<F>
Represents the metadata for a field whose value will be computed from other form field values.

This field is always displayed as read-only, and by default has Field.displayOnly() set to true to display the field value as a plain or raw text representation.

Since:
Metadata Service 2.0.8, Release Train 2.1.6, 2.2.2
Author:
Julia Lopez-Pozas (jlopezpozas)
  • Method Details

    • computationType

      default F computationType(String computationType)
      The type of computation that this field will result in.

      This should match any of the defined ComputationTypes.

      Parameters:
      computationType - the type of computation that this field will result in
      Returns:
      this
    • fieldsToCompute

      default F fieldsToCompute(List<String> fieldsToCompute)
      The list of field names whose values this field will use to compute.

      The fields to compute must have values that are numeric, such as MoneyField and IntegerField.

      The order of the fields listed will be the order they are operated on.

      Parameters:
      fieldsToCompute - a list of field names whose values will be computed
      Returns:
      this
    • fieldsToCompute

      default F fieldsToCompute(String... fieldsToCompute)
      The list of field names whose values this field will use to compute.

      The fields to compute must have values that are numeric, such as MoneyField and IntegerField.

      The order of the fields listed will be the order they are operated on.

      Parameters:
      fieldsToCompute - a variable number of field names whose values will be computed
      Returns:
      this