|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.kernel.exps.AbstractVal
org.apache.openjpa.jdbc.kernel.exps.Const
org.apache.openjpa.jdbc.kernel.exps.Param
public class Param
A parameter in a filter.
| Nested Class Summary | |
|---|---|
static class |
Param.ParamExpState
Expression state. |
| Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.kernel.exps.Const |
|---|
Const.ConstExpState |
| Field Summary |
|---|
| Fields inherited from class org.apache.openjpa.jdbc.kernel.exps.AbstractVal |
|---|
FALSE, TRUE |
| Fields inherited from interface org.apache.openjpa.jdbc.kernel.exps.Val |
|---|
ABS_VAL, ARGS_VAL, CONCAT_VAL, FORCE_OUTER, INDEXOF_VAL, JOIN_REL, LENGTH_VAL, LOCATE_VAL, LOWER_VAL, MATH_VAL, NULL_CMP, SQRT_VAL, SUBSTRING_VAL, TRIM_VAL, UPPER_VAL, VAL |
| Constructor Summary | |
|---|---|
Param(String name,
Class type)
Constructor. |
|
| Method Summary | |
|---|---|
void |
appendTo(Select sel,
ExpContext ctx,
ExpState state,
SQLBuffer sql,
int index)
Append the indexth SQL element to the given buffer. |
void |
calculateValue(Select sel,
ExpContext ctx,
ExpState state,
Val other,
ExpState otherState)
Calculate and cache the SQL for this value. |
int |
getIndex()
|
String |
getName()
|
String |
getParameterName()
Returns the name of the parameter. |
Object |
getSQLValue(Select sel,
ExpContext ctx,
ExpState state)
Return the SQL value of this constant. |
Class |
getType()
Return the expected type for this value, or Object if
the type is unknown. |
Object |
getValue(Object[] params)
Return the value for this constant given the specified parameters. |
ExpState |
initialize(Select sel,
ExpContext ctx,
int flags)
Initialize the value. |
void |
setImplicitType(Class type)
Set the implicit type of the value, based on how it is used in the filter. |
void |
setIndex(int idx)
Set the index of this parameter. |
| Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.Const |
|---|
appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, getMetaData, getValue, groupBy, isSQLValueNull, length, load, orderBy, select, selectColumns, setMetaData |
| Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.AbstractVal |
|---|
acceptVisit, getId, isAggregate, isVariable, isXPath, toDataStoreValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.openjpa.kernel.exps.Value |
|---|
acceptVisit, getMetaData, isAggregate, isVariable, isXPath, setMetaData |
| Constructor Detail |
|---|
public Param(String name,
Class type)
| Method Detail |
|---|
public String getName()
public String getParameterName()
Parameter
getParameterName in interface Parameterpublic Class getType()
ValueObject if
the type is unknown.
getType in interface Valuepublic void setImplicitType(Class type)
ValueObject from Value.getType().
setImplicitType in interface Valuepublic int getIndex()
public void setIndex(int idx)
Parameter
setIndex in interface Parameterpublic Object getValue(Object[] params)
Constant
getValue in interface Constant
public Object getSQLValue(Select sel,
ExpContext ctx,
ExpState state)
Const
getSQLValue in class Const
public ExpState initialize(Select sel,
ExpContext ctx,
int flags)
Val
initialize in interface Valinitialize in class Const
public void calculateValue(Select sel,
ExpContext ctx,
ExpState state,
Val other,
ExpState otherState)
Vallength or any append methods.
calculateValue in interface ValcalculateValue in class Constother - the value being compared to, or null if not a comparison
public void appendTo(Select sel,
ExpContext ctx,
ExpState state,
SQLBuffer sql,
int index)
Valindexth SQL element to the given buffer.
appendTo in interface Val
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||