com.eruces.teadmin.Query
The Query class represent a query.
Inheritance
- Inherits com.eruces.teagent.PersistantObject
Static Public Attributes
| Type | Name | Description |
|---|---|---|
| final short | LogicNodeAnd | Indicates a logic AND node. |
| final short | LogicNodeOr | Indicates a logic OR node. |
| final short | OperatorNode | Indicates a operator node. |
| final short | OperatorUndef | Indicates a undefined operator. |
| final short | OperatorEqual | Indicates the EQUAL operator. |
| final short | OperatorNotEqual | Indicates the NOT_EQUAL operator. |
| final short | OperatorLess | Indicates the LESS operator. |
| final short | OperatorLessOrEqual | Indicates the LESS_OR_EQUAL operator. |
| final short | OperatorGreater | Indicates the GREATER operator. |
| final short | OperatorGreaterOrEqual | Indicates the GREATER_OR_EQUAL operator. |
| final short | OperatorLike | Indicates the LIKE operator. |
| final short | OperatorNotLike | Indicates the NOT_LIKE operator. |
Public Member Functions
| Member | Description |
|---|---|
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
| Parameter | Description |
|---|---|
nodeType | An integer representing the node type. |
Query(String attributeName, short operatorType, PAny anyValue)
The Query constructor with an operation.
Parameters
| Parameter | Description |
|---|---|
attributeName | A string representing the attribute name. |
operatorType | An integer representing the operator type. |
anyValue |
void addChildNode(Query ChildNode)
The addChildNode method adds a child node.
Parameters
| Parameter | Description |
|---|---|
ChildNode | An 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
| Parameter | Description |
|---|---|
attributeName | The name of the attribute to be ordered by. |
lowToHigh | A 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
| Parameter | Description |
|---|---|
top | A integer value indicating the number of records to be returned. |
offset | A 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.