|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.novell.sentinel.client.tinyq.TinyQBuilder
public class TinyQBuilder
A helper class to allow easy programmatic construction of TinyQ expressions.
Example usage:
| Nested Class Summary | |
|---|---|
static class |
TinyQBuilder.BuilderException
Base class of exceptions thrown when errors occur while building a TinyQ query expression. |
static class |
TinyQBuilder.InvalidExpressionTypeException
Exception thrown if an operator is appended in an invalid position. |
static class |
TinyQBuilder.InvalidOperandException
Exception thrown if an invalid operand is supplied to a TinyQ operator. |
| Constructor Summary | |
|---|---|
TinyQBuilder()
Construct an instance. |
|
| Method Summary | |
|---|---|
TinyQBuilder |
and()
Add the TinyQ equivalent of the "AND" operator to the expression. |
String |
build()
Return the TinyQ language expression. |
TinyQBuilder |
equal(String lhs,
Object rhs)
Add the TinyQ equivalent of the "==" operator to the expression. |
TinyQBuilder |
greater(String lhs,
Object rhs)
Add the TinyQ equivalent of the ">" operator to the expression. |
TinyQBuilder |
greaterOrEqual(String lhs,
Object rhs)
Add the TinyQ equivalent of the "<=" operator to the expression. |
TinyQBuilder |
less(String lhs,
Object rhs)
Add the TinyQ equivalent of the "<" operator to the expression. |
TinyQBuilder |
lessOrEqual(String lhs,
Object rhs)
Add the TinyQ equivalent of the "<=" operator to the expression. |
TinyQBuilder |
like(String lhs,
Object rhs)
Add the TinyQ equivalent of the "LIKE" operator to the expression. |
TinyQBuilder |
lparen()
Append the equivalent of a left parenthesis (the left grouping operator); |
TinyQBuilder |
not()
Add the TinyQ equivalent of the "NOT" operator to the expression. |
TinyQBuilder |
notEqual(String lhs,
Object rhs)
Add the TinyQ equivalent of the "!=" operator to the expression. |
TinyQBuilder |
or()
Add the TinyQ equivalent of the "OR" operator to the expression. |
void |
reset()
Reset the instance so another expression can be built. |
TinyQBuilder |
rparen()
Append the equivalent of a right parenthesis (the right grouping operator); |
String |
toString()
Return a human readable String representing the expression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TinyQBuilder()
| Method Detail |
|---|
public void reset()
public String toString()
toString in class Objectpublic String build()
public TinyQBuilder lparen()
throws TinyQBuilder.InvalidExpressionTypeException
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
public TinyQBuilder rparen()
throws TinyQBuilder.InvalidExpressionTypeException
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
public TinyQBuilder like(String lhs,
Object rhs)
throws TinyQBuilder.InvalidOperandException,
TinyQBuilder.InvalidExpressionTypeException
lhs - The left hand operand.rhs - The right hand operand.
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
TinyQBuilder.InvalidOperandException - If an operand is invalid.
public TinyQBuilder equal(String lhs,
Object rhs)
throws TinyQBuilder.InvalidOperandException,
TinyQBuilder.InvalidExpressionTypeException
lhs - The left hand operand.rhs - The right hand operand.
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
TinyQBuilder.InvalidOperandException - If an operand is invalid.
public TinyQBuilder notEqual(String lhs,
Object rhs)
throws TinyQBuilder.InvalidOperandException,
TinyQBuilder.InvalidExpressionTypeException
lhs - The left hand operand.rhs - The right hand operand.
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
TinyQBuilder.InvalidOperandException - If an operand is invalid.
public TinyQBuilder less(String lhs,
Object rhs)
throws TinyQBuilder.InvalidOperandException,
TinyQBuilder.InvalidExpressionTypeException
lhs - The left hand operand.rhs - The right hand operand.
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
TinyQBuilder.InvalidOperandException - If an operand is invalid.
public TinyQBuilder lessOrEqual(String lhs,
Object rhs)
throws TinyQBuilder.InvalidOperandException,
TinyQBuilder.InvalidExpressionTypeException
lhs - The left hand operand.rhs - The right hand operand.
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
TinyQBuilder.InvalidOperandException - If an operand is invalid.
public TinyQBuilder greater(String lhs,
Object rhs)
throws TinyQBuilder.InvalidOperandException,
TinyQBuilder.InvalidExpressionTypeException
lhs - The left hand operand.rhs - The right hand operand.
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
TinyQBuilder.InvalidOperandException - If an operand is invalid.
public TinyQBuilder greaterOrEqual(String lhs,
Object rhs)
throws TinyQBuilder.InvalidOperandException,
TinyQBuilder.InvalidExpressionTypeException
lhs - The left hand operand.rhs - The right hand operand.
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
TinyQBuilder.InvalidOperandException - If an operand is invalid.
public TinyQBuilder and()
throws TinyQBuilder.InvalidExpressionTypeException
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
public TinyQBuilder or()
throws TinyQBuilder.InvalidExpressionTypeException
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
public TinyQBuilder not()
throws TinyQBuilder.InvalidExpressionTypeException
TinyQBuilder.InvalidExpressionTypeException - If the operator is invalid in the current expression position.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||