Package org.apache.openjpa.kernel.exps
Class CandidatePath
- java.lang.Object
-
- org.apache.openjpa.kernel.exps.Val
-
- org.apache.openjpa.kernel.exps.CandidatePath
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CandidatePath.Traversal
Represents a traversal through a field.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.LinkedList
_actions
protected java.lang.String
_correlationVar
-
Constructor Summary
Constructors Constructor Description CandidatePath()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
castTo(java.lang.Class type)
Cast this path to the given type.boolean
equals(java.lang.Object other)
protected java.lang.Object
eval(java.lang.Object candidate, java.lang.Object orig, StoreContext ctx, java.lang.Object[] params)
Return this value for the given candidate.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, java.lang.String name)
Traverse into the gevin xpath name of the current object, and update the current object to that xpath field.protected java.lang.Class
getCandidateType()
java.lang.String
getCorrelationVar()
java.lang.String
getSchemaAlias()
java.lang.Class
getType()
Return the expected type for this value, orObject
if the type is unknown.XMLMetaData
getXmlMapping()
Return the current XPath's xmlmapping metadata.int
hashCode()
FieldMetaData
last()
Return the last field in the path, or null if the path does not not contain a final field.void
setImplicitType(java.lang.Class type)
Set the implicit type of the value, based on how it is used in the filter.void
setSchemaAlias(java.lang.String schemaAlias)
Set the schema alias (the identification variable) this path is begin with.void
setSubqueryContext(Context conext, java.lang.String correlationVar)
-
Methods inherited from class org.apache.openjpa.kernel.exps.Val
acceptVisit, eval, evaluate, evaluate, getAlias, getMetaData, getName, getPath, getSelectAs, isAggregate, isVariable, isXPath, setAlias, setMetaData
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.openjpa.kernel.exps.Value
acceptVisit, getAlias, getMetaData, getName, getPath, getSelectAs, isAggregate, isVariable, isXPath, setAlias, setMetaData
-
-
-
-
Method Detail
-
get
public void get(FieldMetaData field, boolean nullTraversal)
Traverse into the given field of the current object, and update the current object to that field value.
-
getType
public java.lang.Class getType()
Description copied from interface:Value
Return the expected type for this value, orObject
if the type is unknown.
-
getCandidateType
protected java.lang.Class getCandidateType()
-
setImplicitType
public void setImplicitType(java.lang.Class type)
Description copied from interface:Value
Set the implicit type of the value, based on how it is used in the filter. This method is only called on values who returnObject
fromValue.getType()
.- Specified by:
setImplicitType
in interfaceValue
-
last
public FieldMetaData last()
Description copied from interface:Path
Return the last field in the path, or null if the path does not not contain a final field.
-
castTo
public void castTo(java.lang.Class type)
Cast this path to the given type.
-
eval
protected java.lang.Object eval(java.lang.Object candidate, java.lang.Object orig, StoreContext ctx, java.lang.Object[] params)
Description copied from class:Val
Return this value for the given candidate.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
get
public void get(FieldMetaData fmd, XMLMetaData meta)
Description copied from interface:Path
Traverse into the given field that maps to xml column, and update the current object to that field value.
-
get
public void get(XMLMetaData meta, java.lang.String name)
Description copied from interface:Path
Traverse into the gevin xpath name of the current object, and update the current object to that xpath field.
-
getXmlMapping
public XMLMetaData getXmlMapping()
Description copied from interface:Path
Return the current XPath's xmlmapping metadata.- Specified by:
getXmlMapping
in interfacePath
- Returns:
- Return xmlmapping
-
setSchemaAlias
public void setSchemaAlias(java.lang.String schemaAlias)
Description copied from interface:Path
Set the schema alias (the identification variable) this path is begin with.- Specified by:
setSchemaAlias
in interfacePath
-
getSchemaAlias
public java.lang.String getSchemaAlias()
- Specified by:
getSchemaAlias
in interfacePath
-
setSubqueryContext
public void setSubqueryContext(Context conext, java.lang.String correlationVar)
- Specified by:
setSubqueryContext
in interfacePath
-
getCorrelationVar
public java.lang.String getCorrelationVar()
- Specified by:
getCorrelationVar
in interfacePath
-
-