|
||||||||||
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.FilterValueImpl
class FilterValueImpl
Implementation of FilterValue
that wraps a Val
.
Constructor Summary | |
---|---|
FilterValueImpl(Select sel,
ExpContext ctx,
ExpState state,
Val val)
|
Method Summary | |
---|---|
void |
appendTo(SQLBuffer buf)
Append the first SQL element for this value to the given buffer. |
void |
appendTo(SQLBuffer buf,
int index)
Append the index th SQL element for this value to the
given buffer. |
ClassMapping |
getClassMapping()
If this is a path to a persistent object, return its class mapping, else return null. |
String |
getColumnAlias(Column col)
Return the alias to use for the given column (this includes the table alias prefix, if any). |
String |
getColumnAlias(String col,
Table table)
Return the alias to use for the given column (this includes the table alias prefix, if any). |
FieldMapping |
getFieldMapping()
If this is a path to a persistent field, return its mapping, else return null. |
Object |
getSQLValue()
If this is a constant, returns its value as it would be represented in the database in this context, else return null. |
Class |
getType()
Return the expected type of this value. |
Object |
getValue()
If this is a constant, return its value, else return null. |
XMLMetaData |
getXmlMapping()
If this is an XPath, return XML mapping metadata, else return null; |
PCPath |
getXPath()
If this is an XPath, return it, else return null; |
boolean |
isConstant()
Return true if this value represents a literal or parameter. |
boolean |
isPath()
Return true if this value represents a persistent field traversal, such as 'this', 'address.street', or 'projectVariable.title'. |
int |
length()
Return the number of SQL elements in this value. |
boolean |
requiresCast()
return true if CAST is required for this filter value else return false. |
Object |
toDataStoreValue(Object val)
Transform the given value into its datastore equivalent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilterValueImpl(Select sel, ExpContext ctx, ExpState state, Val val)
Method Detail |
---|
public Class getType()
FilterValue
getType
in interface FilterValue
public int length()
FilterValue
length
in interface FilterValue
public void appendTo(SQLBuffer buf)
FilterValue
appendTo
in interface FilterValue
public void appendTo(SQLBuffer buf, int index)
FilterValue
index
th SQL element for this value to the
given buffer.
appendTo
in interface FilterValue
public String getColumnAlias(Column col)
FilterValue
getColumnAlias
in interface FilterValue
public String getColumnAlias(String col, Table table)
FilterValue
getColumnAlias
in interface FilterValue
public Object toDataStoreValue(Object val)
FilterValue
toDataStoreValue
in interface FilterValue
public boolean isConstant()
FilterValue
isConstant
in interface FilterValue
public Object getValue()
FilterValue
getValue
in interface FilterValue
public Object getSQLValue()
FilterValue
getSQLValue
in interface FilterValue
public boolean isPath()
FilterValue
isPath
in interface FilterValue
public ClassMapping getClassMapping()
FilterValue
getClassMapping
in interface FilterValue
public FieldMapping getFieldMapping()
FilterValue
getFieldMapping
in interface FilterValue
public PCPath getXPath()
FilterValue
getXPath
in interface FilterValue
public XMLMetaData getXmlMapping()
FilterValue
getXmlMapping
in interface FilterValue
public boolean requiresCast()
FilterValue
requiresCast
in interface FilterValue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |