|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.kernel.exps.AbstractVal org.apache.openjpa.jdbc.kernel.exps.Const org.apache.openjpa.jdbc.kernel.exps.ConstPath
class ConstPath
A field traversal starting with a constant filter parameter.
Nested Class Summary |
---|
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 | |
---|---|
ConstPath(Const constant)
Constructor. |
Method Summary | |
---|---|
void |
acceptVisit(ExpressionVisitor visitor)
Accept a visit from a tree visitor. |
void |
appendTo(Select sel,
ExpContext ctx,
ExpState state,
SQLBuffer sql,
int index)
Append the index th 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. |
void |
get(FieldMetaData field,
boolean nullTraversal)
Traverse into the given field of the current object, and update the current object to that field value. |
void |
get(FieldMetaData fmd,
XMLMetaData meta)
Traverse into the given field that maps to xml column, and update the current object to that field value. |
void |
get(XMLMetaData meta,
String name)
Traverse into the gevin xpath name of the current object, and update the current object to that xpath field. |
void |
getKey()
|
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(ExpContext ctx,
ExpState state)
Return the value of this constant. |
Object |
getValue(Object[] params)
Return the value for this constant given the specified parameters. |
XMLMetaData |
getXmlMapping()
Return the current XPath's xmlmapping metadata. |
ExpState |
initialize(Select sel,
ExpContext ctx,
int flags)
Initialize the value. |
FieldMetaData |
last()
Return the last field in the path, or null if the path does not not contain a final field. |
void |
setImplicitType(Class type)
Set the implicit type of the value, based on how it is used in the filter. |
Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.Const |
---|
appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, getMetaData, groupBy, isSQLValueNull, length, load, orderBy, select, selectColumns, setMetaData |
Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.AbstractVal |
---|
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 |
---|
getMetaData, isAggregate, isVariable, isXPath, setMetaData |
Methods inherited from interface org.apache.openjpa.jdbc.kernel.exps.Val |
---|
appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, getId, groupBy, length, load, orderBy, select, selectColumns, toDataStoreValue |
Methods inherited from interface org.apache.openjpa.kernel.exps.Value |
---|
getMetaData, isAggregate, isVariable, isXPath, setMetaData |
Constructor Detail |
---|
public ConstPath(Const constant)
Method Detail |
---|
public Class getType()
Value
Object
if
the type is unknown.
getType
in interface Value
public void setImplicitType(Class type)
Value
Object
from Value.getType()
.
setImplicitType
in interface Value
public void get(FieldMetaData field, boolean nullTraversal)
Path
get
in interface Path
nullTraversal
- if true, allow traversal through a null fieldpublic void getKey()
getKey
in interface JDBCPath
public FieldMetaData last()
Path
last
in interface Path
public Object getValue(Object[] params)
Constant
getValue
in interface Constant
public Object getValue(ExpContext ctx, ExpState state)
Const
getValue
in class Const
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 Val
initialize
in class Const
public void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState)
Val
length
or any append
methods.
calculateValue
in interface Val
calculateValue
in class Const
other
- the value being compared to, or null if not a comparisonpublic void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index)
Val
index
th SQL element to the given buffer.
appendTo
in interface Val
public void acceptVisit(ExpressionVisitor visitor)
Value
acceptVisit
in interface Value
acceptVisit
in class AbstractVal
public void get(FieldMetaData fmd, XMLMetaData meta)
Path
get
in interface Path
fmd
- field maps to xml columnmeta
- associated xml mappingpublic void get(XMLMetaData meta, String name)
Path
get
in interface Path
public XMLMetaData getXmlMapping()
Path
getXmlMapping
in interface Path
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |