public class BindVariable extends ValueExpression
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
SPECIAL_NAME_PREFIX |
| 构造器和说明 |
|---|
BindVariable() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
Object |
evaluate(Object o,
Query q)
Evaluates the value of this bind variable.
|
String |
getAccessor() |
Class |
getExpectedReturnType(Query q)
Get the expected return type.
|
String |
getName() |
Object |
getValue(Object o,
Query q)
Gets the value of this bind variable.
|
boolean |
hasFixedResult(Query q)
Will always return false since a bind variable cannot be fixed.
|
void |
init(Query q)
Initialises this bind variable.
|
boolean |
isAnonymous() |
boolean |
isTrue(Object o,
Query q)
Returns whether the value of this bind variable represents a
true
value. |
void |
setAccessor(String a) |
void |
setAnonymous(boolean v) |
void |
setName(String name) |
String |
toString()
Returns a string version of this bind variable.
|
isBracketed, setBracketedpublic String getAccessor()
public void setAccessor(String a)
public Class getExpectedReturnType(Query q) throws QueryParseException
Query.parse(String) method to ensure that the correct class is returned here.getExpectedReturnType 在类中 Expressionq - The Query object.java.lang.Object.class if the class
cannot be determined.QueryParseException - If the type cannot be determined.public void init(Query q) throws QueryParseException
init 在类中 Expressionq - The Query object.QueryParseException - If the bind variable cannot be inited.public String getName()
public boolean isAnonymous()
public void setAnonymous(boolean v)
public void setName(String name)
public Object getValue(Object o, Query q) throws QueryExecutionException
getValue 在类中 ValueExpressiono - The current object. Note that this variable isn't used in this method.q - The Query object.QueryExecutionException - If something goes wrong during the accessing
of the value.public boolean isTrue(Object o, Query q) throws QueryExecutionException
true
value. See: ArithmeticExpression.isTrue(Object,Query) for details of how
the return value is determined.isTrue 在类中 Expressiono - The current object. Not used in this method.q - The Query object.true if the bind variable evaluates to true.QueryExecutionException - If a problem occurs during evaluation.public Object evaluate(Object o, Query q) throws QueryExecutionException
getValue(Object,Query).evaluate 在类中 ValueExpressiono - The current object, not used in this method.q - The Query object.QueryExecutionException - If there is a problem getting the value.public String toString()
toString 在类中 Expressionpublic boolean hasFixedResult(Query q)
hasFixedResult 在类中 Expressionq - The Query object.false always.Copyright © 2021. All rights reserved.