Package com.jk.data.dynamic.query
Class Operator
java.lang.Object
com.jk.data.dynamic.query.Operator
- All Implemented Interfaces:
QueryComponent
This class represents a query component that defines common operators used in
query conditions.
It implements the QueryComponent
interface.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
This method get the operator name.boolean
isInline()
This method determines whether the query component should be rendered in-line in the query structure (true) or not (false).void
This method sets the operator name to the provided value.This method converts the query component into a query element that can be included in the query structure.toString()
Returns a string representation of the object
-
Field Details
-
EQUAL
Represents the equal operator. -
COMMA
Represents the comma operator. -
MORE_THAN
Represents the more than operator. -
LESS_THAN
Represents the less than operator.
-
-
Constructor Details
-
Operator
This method constructs a newOperator
.- Parameters:
name
- the name
-
-
Method Details
-
getName
This method get the operator name.- Returns:
- the operator name.
-
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:
- true.
-
setName
This method sets the operator name to the provided value.- Parameters:
name
- Specifies the new operator name.
-
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.
-
toString
Returns a string representation of the object
-