| |
|
| java.lang.Object org.jpox.store.expression.ScalarExpression org.jpox.store.expression.UnboundVariable
UnboundVariable | public class UnboundVariable extends ScalarExpression (Code) | | Representation of an unbound variable in a Query.
version: $Revision: 1.27 $ |
Inner Class :public static interface VariableBinder | |
UnboundVariable | public UnboundVariable(QueryExpression qs, String name, Class type, UnboundVariable.VariableBinder binder)(Code) | | Constructor.
Parameters: qs - The Query Expression Parameters: name - Name of the variable Parameters: type - Type of the variable (if known at this point) Parameters: binder - The Binder that we can bind with this variable when we know which expression to bind to. |
accessField | public ScalarExpression accessField(String fieldName, boolean innerJoin)(Code) | | Method to access a field in the class of the variable.
Parameters: fieldName - Name of the field to access Parameters: innerJoin - whether to use an inner join to access this field The scalar expression for the field |
bindTo | public void bindTo(ScalarExpression qsc)(Code) | | Method to bind this variable to its expression, using the JDOQL compiler.
Parameters: qsc - The expression to bind to. |
eq | public BooleanExpression eq(ScalarExpression expr)(Code) | | Checks if one expression is equals the other expression
Parameters: expr - the expression to check if this is equals to the expression the BooleanExpression |
getExpressionList | public ExpressionList getExpressionList()(Code) | | |
getVariableName | public String getVariableName()(Code) | | Accessor for the variable name.
The variable name |
getVariableType | public Class getVariableType()(Code) | | Accessor for the variable type.
The variable type |
noteq | public BooleanExpression noteq(ScalarExpression expr)(Code) | | Checks if one expression is not equals the other expression
Parameters: expr - the expression to check if this is not equals to the expression the BooleanExpression |
setVariableType | public void setVariableType(Class type)(Code) | | Mutator for the variable type in the case where we have an implicit variable and
its type is not known at construction. Only updates the type if it was null at construction.
Parameters: type - The type |
toStatementText | public StatementText toStatementText(int mode)(Code) | | Change the output statement text to refer to the bound to expression
since it has real fields and this is only a variable.
Parameters: mode - Mode of operation The statement text for this unbound variable |
toStatementText | public StatementText toStatementText()(Code) | | StatementText representation of this expression. I.E. A Boolean field may be stored in
boolean format like 0 or 1, and it can also be stored in other formats, like Y or N, TRUE or FALSE, and so on.
The projection mode for the boolean field is the real content of the value stored, (e.g. Y or N), and opposed to
that the filter mode for the boolean field is always represented by a boolean expression (e.g. Y=Y or N=N)
In SQL, the projection can be exemplified as "SELECT BOOLEAN_FIELD ... " and the filter as
"SELECT COLUMNS ... WHERE BOOLEAN_FIELD ='Y'"
the StatementText |
|
|
|