Class FieldCondition

java.lang.Object
com.jk.data.dynamic.query.FieldCondition
All Implemented Interfaces:
Condition, QueryComponent

public class FieldCondition extends Object implements Condition
This class represents a condition in a query that compares a field with a specified value using a given operator.

It implements the Condition interface.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • FieldCondition

      public FieldCondition()
      This method constructs a new FieldCondition.
    • FieldCondition

      public FieldCondition(Object fieldMetadata, Object value)
      This method is yet to be implemented. (TBI)
      Parameters:
      fieldMetadata - Specifies the method parameter which is yet to be implemented (TBI).
      value - Specifies the method parameter which is yet to be implemented (TBI).
  • Method Details

    • getFieldName

      public String getFieldName()
      This method gets name of the field.
      Returns:
      the field name.
    • getOperator

      public Operator getOperator()
      This method gets the operator used for comparison.
      Returns:
      the operator.
    • getValue

      public Object getValue()
      This method gets the value used for comparison.
      Returns:
      the comparison value.
    • isInline

      public boolean isInline()
      This method determines whether the query component should be rendered in-line in the query structure (true) or not (false).
      Specified by:
      isInline in interface QueryComponent
      Returns:
      false.
    • setFieldName

      public void setFieldName(String fieldName)
      This method sets the field name to the provided value.
      Parameters:
      fieldName - Specifies the new field name.
    • setOperator

      public void setOperator(Operator operator)
      This method sets the operator to the provided value.
      Parameters:
      operator - Specifies the new operator.
    • setValue

      public void setValue(Object value)
      This method sets the value to be compared to the provided value.
      Parameters:
      value - Specifies the new comparison value.
    • toQueryElement

      public Object toQueryElement()
      This method converts the query component into a query element that can be included in the query structure.
      Specified by:
      toQueryElement in interface QueryComponent
      Returns:
      the query element, which can be a string or any appropriate object representation.