Package com.jk.data.dynamic.query
Class FieldCondition
java.lang.Object
com.jk.data.dynamic.query.FieldCondition
- All Implemented Interfaces:
Condition
,QueryComponent
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 Summary
ConstructorsConstructorDescriptionThis method constructs a newFieldCondition
.FieldCondition
(Object fieldMetadata, Object value) This method is yet to be implemented. -
Method Summary
Modifier and TypeMethodDescriptionThis method gets name of the field.This method gets the operator used for comparison.getValue()
This method gets the value used for comparison.boolean
isInline()
This method determines whether the query component should be rendered in-line in the query structure (true) or not (false).void
setFieldName
(String fieldName) This method sets the field name to the provided value.void
setOperator
(Operator operator) This method sets the operator to the provided value.void
This method sets the value to be compared to the provided value.This method converts the query component into a query element that can be included in the query structure.
-
Constructor Details
-
FieldCondition
public FieldCondition()This method constructs a newFieldCondition
. -
FieldCondition
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
This method gets name of the field.- Returns:
- the field name.
-
getOperator
This method gets the operator used for comparison.- Returns:
- the operator.
-
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 interfaceQueryComponent
- Returns:
- false.
-
setFieldName
This method sets the field name to the provided value.- Parameters:
fieldName
- Specifies the new field name.
-
setOperator
This method sets the operator to the provided value.- Parameters:
operator
- Specifies the new operator.
-
setValue
This method sets the value to be compared to the provided value.- Parameters:
value
- Specifies the new comparison value.
-
toQueryElement
This method converts the query component into a query element that can be included in the query structure.- Specified by:
toQueryElement
in interfaceQueryComponent
- Returns:
- the query element, which can be a string or any appropriate object representation.
-