class FilterValueImpl extends Object implements FilterValue
FilterValue that wraps a Val.| Constructor and Description |
|---|
FilterValueImpl(Select sel,
ExpContext ctx,
ExpState state,
Val val) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(SQLBuffer buf)
Append the first SQL element for this value to the given buffer.
|
void |
appendTo(SQLBuffer buf,
int index)
Append the
indexth 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.
|
public FilterValueImpl(Select sel, ExpContext ctx, ExpState state, Val val)
public Class getType()
FilterValuegetType in interface FilterValuepublic int length()
FilterValuelength in interface FilterValuepublic void appendTo(SQLBuffer buf)
FilterValueappendTo in interface FilterValuepublic void appendTo(SQLBuffer buf, int index)
FilterValueindexth SQL element for this value to the
given buffer.appendTo in interface FilterValuepublic String getColumnAlias(Column col)
FilterValuegetColumnAlias in interface FilterValuepublic String getColumnAlias(String col, Table table)
FilterValuegetColumnAlias in interface FilterValuepublic Object toDataStoreValue(Object val)
FilterValuetoDataStoreValue in interface FilterValuepublic boolean isConstant()
FilterValueisConstant in interface FilterValuepublic Object getValue()
FilterValuegetValue in interface FilterValuepublic Object getSQLValue()
FilterValuegetSQLValue in interface FilterValuepublic boolean isPath()
FilterValueisPath in interface FilterValuepublic ClassMapping getClassMapping()
FilterValuegetClassMapping in interface FilterValuepublic FieldMapping getFieldMapping()
FilterValuegetFieldMapping in interface FilterValuepublic PCPath getXPath()
FilterValuegetXPath in interface FilterValuepublic XMLMetaData getXmlMapping()
FilterValuegetXmlMapping in interface FilterValuepublic boolean requiresCast()
FilterValuerequiresCast in interface FilterValueCopyright © 2006–2015 Apache Software Foundation. All rights reserved.