|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.selector.DefaultExpressionFactory
Default implementation of ExpressionFactory
ExpressionFactory
,
SelectorTokenTypes
Constructor Summary | |
DefaultExpressionFactory()
|
Method Summary | |
Expression |
between(Expression num1,
Expression num2,
Expression num3)
Create a 'between' expression that returns the result of: num1 >= num2 and num1 <= num3
when evaluated |
Expression |
binaryOperator(int operator,
Expression left,
Expression right)
Create a binary operator expression |
Expression |
identifier(java.lang.String name)
Create an identifier expression |
Expression |
in(Expression identifier,
java.util.HashSet set)
Create an 'in' expression |
Expression |
isNull(Expression identifier)
Create an 'is null' expression |
Expression |
like(Expression identifier,
java.lang.String pattern,
java.lang.String escape)
Create a 'like' expression |
Expression |
literal(int type,
java.lang.String text)
Create a literal expression |
Expression |
unaryOperator(int operator,
Expression operand)
Create an unary operator expression |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultExpressionFactory()
Method Detail |
public Expression binaryOperator(int operator, Expression left, Expression right) throws SelectorException
binaryOperator
in interface ExpressionFactory
operator
- the operator token type from SelectorTokenTypesleft
- the left-hand side of the binary expressionright
- the right-hand side of the binary expressionSelectorException
- if the operator is not a valid binary operatorpublic Expression unaryOperator(int operator, Expression operand) throws SelectorException
unaryOperator
in interface ExpressionFactory
operator
- the operator token type from SelectorTokenTypesoperand
- the expression to apply the operator toSelectorException
- if the operator is not a valid unary operatorpublic Expression identifier(java.lang.String name) throws SelectorException
identifier
in interface ExpressionFactory
name
- the name of the identifierSelectorException
- is name is not a valid identifierpublic Expression isNull(Expression identifier) throws SelectorException
isNull
in interface ExpressionFactory
identifier
- the identifer expression to apply the 'is null' testSelectorException
- for any errorpublic Expression like(Expression identifier, java.lang.String pattern, java.lang.String escape) throws SelectorException
like
in interface ExpressionFactory
identifier
- the identifer to apply the 'like' test topattern
- the search patternescape
- the escape character. This may be nullSelectorException
- if the pattern or escape is invalidpublic Expression between(Expression num1, Expression num2, Expression num3) throws SelectorException
num1 >= num2 and num1 <= num3
when evaluatedbetween
in interface ExpressionFactory
num1
- an arithmethic expressionnum2
- an arithmethic expressionnum3
- an arithmethic expressionSelectorException
- for any errorpublic Expression in(Expression identifier, java.util.HashSet set) throws SelectorException
in
in interface ExpressionFactory
identifier
- string identifer to apply the 'in' test toset
- the set of string values to compare againstSelectorException
- for any errorpublic Expression literal(int type, java.lang.String text) throws SelectorException
literal
in interface ExpressionFactory
type
- the operator token type from SelectorTokenTypestext
- the literal textSelectorException
- if type is not a valid literal type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |