Record Class ColumnCondition

java.lang.Object
java.lang.Record
de.calamanari.adl.sql.cnv.ColumnCondition
Record Components:
type - tells how this condition should be translated
operator - the operator to compare the column against the value
column - to be compared
parameters - one or multiple prepared parameters, see ColumnConditionType

public record ColumnCondition(ColumnConditionType type, de.calamanari.adl.irl.MatchOperator operator, AdlSqlColumn column, List<QueryParameter> parameters) extends Record
A ColumnCondition carries the meta data and the prepared parameters related to a single column, which can either be a DataColumn (means a column related to an argName) or a FilterColumn to be tested against a value.

Column conditions apply to value matches and also to reference matches if the related column or referenced column has filters.
Additional column conditions can occur in the main WHERE-clause if the table the query is starting with has table filter columns.

Author:
Karl Eilebrecht
  • Constructor Details

    • ColumnCondition

      public ColumnCondition(ColumnConditionType type, de.calamanari.adl.irl.MatchOperator operator, AdlSqlColumn column, List<QueryParameter> parameters)
      Creates an instance of a ColumnCondition record class.
      Parameters:
      type - the value for the type record component
      operator - the value for the operator record component
      column - the value for the column record component
      parameters - the value for the parameters record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      public ColumnConditionType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • operator

      public de.calamanari.adl.irl.MatchOperator operator()
      Returns the value of the operator record component.
      Returns:
      the value of the operator record component
    • column

      public AdlSqlColumn column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component
    • parameters

      public List<QueryParameter> parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component