Record Class SqlCondition

java.lang.Object
java.lang.Record
overit.geocall.da.SqlCondition

public record SqlCondition(String fieldName, String prefix, SqlOperator sqlOperator, String valuePlaceholder, Object value) extends Record
Class about a SQL condition useful when constructing SQL queries via DABase.
  • Constructor Details

    • SqlCondition

      public SqlCondition(String fieldName, String prefix, SqlOperator sqlOperator, String valuePlaceholder, Object value)
      Creates a new SqlCondition using the provided arguments.
      Parameters:
      fieldName - String about a field name.
      prefix - String about a possible prefix to prepend to the field name when constructing the related SQL clause.
      sqlOperator - SqlOperator about the operator to use when constructing the related SQL clause.
      valuePlaceholder - String about the value placeholder useful when constructing the related SQL clause.
      value - Object about the condition value.
  • Method Details

    • getSqlClause

      public String getSqlClause()
      Returns a String about the related SQL clause created using this SqlCondition instance.
      Returns:
      a String about the related SQL clause created using this SqlCondition instance.
    • 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.
    • fieldName

      public String fieldName()
      Returns the value of the fieldName record component.
      Returns:
      the value of the fieldName record component
    • prefix

      public String prefix()
      Returns the value of the prefix record component.
      Returns:
      the value of the prefix record component
    • sqlOperator

      public SqlOperator sqlOperator()
      Returns the value of the sqlOperator record component.
      Returns:
      the value of the sqlOperator record component
    • valuePlaceholder

      public String valuePlaceholder()
      Returns the value of the valuePlaceholder record component.
      Returns:
      the value of the valuePlaceholder record component
    • value

      public Object value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component