Interface AggregationVariable

All Superinterfaces:
Field
All Known Implementing Classes:
ArrayOperators.Reduce.Variable, SystemVariable

public interface AggregationVariable extends Field
A special field that points to a variable $$ expression.
Since:
4.1.3
Author:
Christoph Strobl
  • Field Details

  • Method Details

    • isAliased

      default boolean isAliased()
      Description copied from interface: Field
      Returns whether the Field is aliased, which means it has a name set different from the target.
      Specified by:
      isAliased in interface Field
      Returns:
      true if the fields name does not match the defined target.
    • getName

      default String getName()
      Description copied from interface: Field
      Returns the name of the field.
      Specified by:
      getName in interface Field
      Returns:
      must not be null.
    • isInternal

      default boolean isInternal()
      Specified by:
      isInternal in interface Field
      Returns:
      true if the field name references a local value such as $$this.
    • variable

      static AggregationVariable variable(String value)
      Create a new AggregationVariable for the given name.

      Variables start with $$. If not, the given value gets prefixed with $$.

      Parameters:
      value - must not be null.
      Returns:
      new instance of AggregationVariable.
      Throws:
      IllegalArgumentException - if given value is null.
    • localVariable

      static AggregationVariable localVariable(String value)
      Create a new local AggregationVariable for the given name.

      Variables start with $$. If not, the given value gets prefixed with $$.

      Parameters:
      value - must not be null.
      Returns:
      new instance of AggregationVariable.
      Throws:
      IllegalArgumentException - if given value is null.
    • isVariable

      static boolean isVariable(@Nullable String fieldRef)
      Check if the given field name reference may be variable.
      Parameters:
      fieldRef - can be null.
      Returns:
      true if given value matches the variable identification pattern.
    • isVariable

      static boolean isVariable(Field field)
      Check if the given field may be variable.
      Parameters:
      field - can be null.
      Returns:
      true if given field is an AggregationVariable or if its value is a variable.