Skip to main content

com.eruces.teadmin.Query

The Query class represent a query.

Inheritance

Static Public Attributes

TypeNameDescription
final shortLogicNodeAndIndicates a logic AND node.
final shortLogicNodeOrIndicates a logic OR node.
final shortOperatorNodeIndicates a operator node.
final shortOperatorUndefIndicates a undefined operator.
final shortOperatorEqualIndicates the EQUAL operator.
final shortOperatorNotEqualIndicates the NOT_EQUAL operator.
final shortOperatorLessIndicates the LESS operator.
final shortOperatorLessOrEqualIndicates the LESS_OR_EQUAL operator.
final shortOperatorGreaterIndicates the GREATER operator.
final shortOperatorGreaterOrEqualIndicates the GREATER_OR_EQUAL operator.
final shortOperatorLikeIndicates the LIKE operator.
final shortOperatorNotLikeIndicates the NOT_LIKE operator.

Public Member Functions

MemberDescription
Query()The Query constructor is the default class constructor.
Query(short nodeType)The Query constructor with a node type.
Query(String attributeName, short operatorType, PAny anyValue)The Query constructor with an operation.
void addChildNode(Query ChildNode)The addChildNode method adds a child node.
boolean isEmpty()The isEmpty method checks if a query is empty.
void orderBy(String attributeName, boolean lowToHigh)The orderBy method sets the ORDER BY condition.
void setLimit(long top, long offset)The setLimit method sets the limit of the returned number of records.
String toString()The toString method converts the Query class into a string.

Member Function Documentation

Query()

The Query constructor is the default class constructor.

Query(short nodeType)

The Query constructor with a node type.

Parameters

ParameterDescription
nodeTypeAn integer representing the node type.

Query(String attributeName, short operatorType, PAny anyValue)

The Query constructor with an operation.

Parameters

ParameterDescription
attributeNameA string representing the attribute name.
operatorTypeAn integer representing the operator type.
anyValue

void addChildNode(Query ChildNode)

The addChildNode method adds a child node.

Parameters

ParameterDescription
ChildNodeAn query representing the child query.

boolean isEmpty()

The isEmpty method checks if a query is empty.

Returns: A boolean where true means empty.

void orderBy(String attributeName, boolean lowToHigh)

The orderBy method sets the ORDER BY condition.

Parameters

ParameterDescription
attributeNameThe name of the attribute to be ordered by.
lowToHighA boolean where true means order from low value to high value.

void setLimit(long top, long offset)

The setLimit method sets the limit of the returned number of records.

Parameters

ParameterDescription
topA integer value indicating the number of records to be returned.
offsetA integer value indicating the number of records to be discarded at the beginning.

String toString()

The toString method converts the Query class into a string.

Returns: The Query object converted into a string.