|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.expression.ScalarExpression
A Scalar expression in a Query. Used to compute values with a resulting type
Nested Class Summary | |
protected static class |
ScalarExpression.DyadicOperator
"Dyadic" operator performs operation on one or two operands |
class |
ScalarExpression.ExpressionList
Ordered list of expressions comma separated |
static class |
ScalarExpression.FieldExpression
A field expression represents a storage location for the value with an associated type |
static class |
ScalarExpression.IllegalArgumentTypeException
An illegal argument error represents method invocations with unsupported/invalid argument types |
static class |
ScalarExpression.IllegalOperationException
Inner class representing an illegal operation. |
static class |
ScalarExpression.MethodInvocationException
A method invocation error represents an effort to invoke a operation on a expression |
protected static class |
ScalarExpression.MonadicOperator
"Monadic" operator performs a function on one operand. |
protected static class |
ScalarExpression.Operator
Inner class representing an Operator |
Constructor Summary | |
protected |
ScalarExpression(QueryExpression qs)
Constructor. |
protected |
ScalarExpression(QueryExpression qs,
JavaTypeMapping mapping,
LogicSetExpression te)
Constructor for an expression of the mapping in the specified table. |
protected |
ScalarExpression(ScalarExpression.MonadicOperator op,
ScalarExpression operand)
Perform a function op on operand |
protected |
ScalarExpression(ScalarExpression operand1,
ScalarExpression.DyadicOperator op,
ScalarExpression operand2)
Performs a function on two arguments. |
protected |
ScalarExpression(java.lang.String functionName,
java.util.List args)
Generates statement as e.g. |
protected |
ScalarExpression(java.lang.String functionName,
java.util.List args,
java.util.List types)
Generates statement as e.g. |
Method Summary | |
ScalarExpression |
accessField(java.lang.String fieldName,
boolean innerJoin)
A field access expression may access a field of an object or array, a reference to which is the value of an expression |
ScalarExpression |
add(ScalarExpression expr)
Additive Operator. |
BooleanExpression |
and(ScalarExpression expr)
Conditional And. |
ScalarExpression |
as(java.lang.String aliasIdentifier)
Define a new identifier for this expression |
ScalarExpression |
callMethod(java.lang.String methodName,
java.util.List arguments)
Invoke a function in a expression. |
ScalarExpression |
cast(java.lang.Class type)
A cast expression converts, at run time, a value of one type to a similar value of another type; or confirms, at compile time, that the type of an expression is boolean; or checks, at run time, that a reference value refers to an object whose class is compatible with a specified reference type. |
ScalarExpression |
com()
Bitwise Complement Operator |
ScalarExpression |
div(ScalarExpression expr)
Division Operator. |
ScalarExpression |
encloseWithInParentheses()
Method to request the enclosure of this expression within parentheses |
BooleanExpression |
eor(ScalarExpression expr)
Exclusive OR |
BooleanExpression |
eq(ScalarExpression expr)
Equality operator (equals to) |
boolean |
equals(java.lang.Object o)
Equality operator providing a simple comparison of expressions. |
java.lang.String |
getAlias()
Accessor for the alias (if any). |
ScalarExpression.ExpressionList |
getExpressionList()
Returns the expression list. |
LogicSetExpression |
getLogicSetExpression()
Accessor for the table expression being used by this expression. |
JavaTypeMapping |
getMapping()
Accessor for the mapping for this expression (if any). |
java.lang.String |
getNonAliasExpression()
Accessor for the expression without any alias. |
QueryExpression |
getQueryExpression()
Accessor for the query expression. |
BooleanExpression |
gt(ScalarExpression expr)
Relational operator (greater than) |
BooleanExpression |
gteq(ScalarExpression expr)
Relational operator (greater than or equals) |
BooleanExpression |
in(ScalarExpression expr)
In expression. |
BooleanExpression |
instanceOf(ScalarExpression expr)
Type Comparison Operator instanceof |
BooleanExpression |
ior(ScalarExpression expr)
Conditional OR. |
BooleanExpression |
lt(ScalarExpression expr)
Relational operator (lower than) |
BooleanExpression |
lteq(ScalarExpression expr)
Relational operator (lower than or equals) |
ScalarExpression |
mod(ScalarExpression expr)
Remainder Operator. |
ScalarExpression |
mul(ScalarExpression expr)
Multiplication Operator |
ScalarExpression |
neg()
Unary Minus Operator |
BooleanExpression |
not()
Logical complement |
BooleanExpression |
noteq(ScalarExpression expr)
Equality operator (not equals to) |
ScalarExpression |
sub(ScalarExpression expr)
Additive Operator. |
StatementText |
toStatementText(int mode)
StatementText representation of this expression. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final Localiser LOCALISER
public static int PROJECTION
public static int FILTER
public static final ScalarExpression.DyadicOperator OP_OR
public static final ScalarExpression.DyadicOperator OP_AND
public static final ScalarExpression.MonadicOperator OP_NOT
public static final ScalarExpression.DyadicOperator OP_EQ
public static final ScalarExpression.DyadicOperator OP_NOTEQ
public static final ScalarExpression.DyadicOperator OP_LT
public static final ScalarExpression.DyadicOperator OP_LTEQ
public static final ScalarExpression.DyadicOperator OP_GT
public static final ScalarExpression.DyadicOperator OP_GTEQ
public static final ScalarExpression.DyadicOperator OP_LIKE
public static final ScalarExpression.DyadicOperator OP_BETWEEN
public static final ScalarExpression.DyadicOperator OP_IS
public static final ScalarExpression.DyadicOperator OP_ISNOT
public static final ScalarExpression.DyadicOperator OP_IN
public static final ScalarExpression.DyadicOperator OP_ADD
public static final ScalarExpression.DyadicOperator OP_SUB
public static final ScalarExpression.DyadicOperator OP_CONCAT
public static final ScalarExpression.DyadicOperator OP_MUL
public static final ScalarExpression.DyadicOperator OP_DIV
public static final ScalarExpression.DyadicOperator OP_MOD
public static final ScalarExpression.MonadicOperator OP_NEG
public static final ScalarExpression.MonadicOperator OP_COM
protected final QueryExpression qs
protected LogicSetExpression te
protected final StatementText st
protected ScalarExpression.Operator lowestOperator
protected java.lang.String aliasIdentifier
protected JavaTypeMapping mapping
protected ScalarExpression.ExpressionList expressionList
Constructor Detail |
protected ScalarExpression(QueryExpression qs)
qs
- The Query Expressionprotected ScalarExpression(QueryExpression qs, JavaTypeMapping mapping, LogicSetExpression te)
qs
- The Query Expressionmapping
- The field mappingte
- The tableprotected ScalarExpression(java.lang.String functionName, java.util.List args)
functionName
- Name of the functionargs
- ScalarExpression listprotected ScalarExpression(java.lang.String functionName, java.util.List args, java.util.List types)
functionName
- Name of functionargs
- ScalarExpression listtypes
- String or ScalarExpression listprotected ScalarExpression(ScalarExpression.MonadicOperator op, ScalarExpression operand)
op
on operand
op
- operatoroperand
- operandprotected ScalarExpression(ScalarExpression operand1, ScalarExpression.DyadicOperator op, ScalarExpression operand2)
operand1
- the first expressionop
- the operator between operandsoperand2
- the second expressionMethod Detail |
public QueryExpression getQueryExpression()
public LogicSetExpression getLogicSetExpression()
public BooleanExpression and(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression eor(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression ior(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression not()
public BooleanExpression eq(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression noteq(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression lt(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression lteq(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression gt(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression gteq(ScalarExpression expr)
expr
- the right-hand operand
public BooleanExpression instanceOf(ScalarExpression expr)
expr
- the right-hand ReferenceType expression
public BooleanExpression in(ScalarExpression expr)
expr
expr
- the right-hand expression
public ScalarExpression add(ScalarExpression expr)
expr
- the right-hand operand
public ScalarExpression sub(ScalarExpression expr)
expr
- the right-hand operand
public ScalarExpression mul(ScalarExpression expr)
expr
- the right-hand operator
public ScalarExpression div(ScalarExpression expr)
expr
- the right-hand operator
public ScalarExpression mod(ScalarExpression expr)
expr
- the right-hand operator
public ScalarExpression neg()
public ScalarExpression com()
public ScalarExpression cast(java.lang.Class type)
type
- the type named by the cast operator
public ScalarExpression accessField(java.lang.String fieldName, boolean innerJoin)
fieldName
- the field identifierinnerJoin
- true if in datastore to use inner joins; false to use left joins
public ScalarExpression as(java.lang.String aliasIdentifier)
aliasIdentifier
- the alias
public java.lang.String getAlias()
public java.lang.String getNonAliasExpression()
public ScalarExpression callMethod(java.lang.String methodName, java.util.List arguments)
methodName
Method([ScalarExpression argument1, [ScalarExpression argument2],...])".
The number of arguments is equivalent to the size of the arguments
list.
methodName
- the function namearguments
- the arguments
public ScalarExpression encloseWithInParentheses()
public StatementText toStatementText(int mode)
mode
- (0=PROJECTION;1=FILTER)
public boolean equals(java.lang.Object o)
o
- The other object
public java.lang.String toString()
public JavaTypeMapping getMapping()
public ScalarExpression.ExpressionList getExpressionList()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |