Interface FilterValue
-
public interface FilterValueThe simplified public view of any non-operator in a query filter, including constants, variables, and object fields.- Author:
- Abe White
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappendTo(SQLBuffer buf)Append the first SQL element for this value to the given buffer.voidappendTo(SQLBuffer buf, int index)Append theindexth SQL element for this value to the given buffer.ClassMappinggetClassMapping()If this is a path to a persistent object, return its class mapping, else return null.java.lang.StringgetColumnAlias(java.lang.String col, Table table)Return the alias to use for the given column (this includes the table alias prefix, if any).java.lang.StringgetColumnAlias(Column col)Return the alias to use for the given column (this includes the table alias prefix, if any).FieldMappinggetFieldMapping()If this is a path to a persistent field, return its mapping, else return null.java.lang.ObjectgetSQLValue()If this is a constant, returns its value as it would be represented in the database in this context, else return null.java.lang.ClassgetType()Return the expected type of this value.java.lang.ObjectgetValue()If this is a constant, return its value, else return null.XMLMetaDatagetXmlMapping()If this is an XPath, return XML mapping metadata, else return null;PCPathgetXPath()If this is an XPath, return it, else return null;booleanisConstant()Return true if this value represents a literal or parameter.booleanisPath()Return true if this value represents a persistent field traversal, such as 'this', 'address.street', or 'projectVariable.title'.intlength()Return the number of SQL elements in this value.booleanrequiresCast()return true if CAST is required for this filter value else return false.java.lang.ObjecttoDataStoreValue(java.lang.Object val)Transform the given value into its datastore equivalent.
-
-
-
Method Detail
-
getType
java.lang.Class getType()
Return the expected type of this value.
-
length
int length()
Return the number of SQL elements in this value. Usually 1.
-
appendTo
void appendTo(SQLBuffer buf)
Append the first SQL element for this value to the given buffer.
-
appendTo
void appendTo(SQLBuffer buf, int index)
Append theindexth SQL element for this value to the given buffer.
-
getColumnAlias
java.lang.String getColumnAlias(Column col)
Return the alias to use for the given column (this includes the table alias prefix, if any).
-
getColumnAlias
java.lang.String getColumnAlias(java.lang.String col, Table table)Return the alias to use for the given column (this includes the table alias prefix, if any).
-
toDataStoreValue
java.lang.Object toDataStoreValue(java.lang.Object val)
Transform the given value into its datastore equivalent.
-
isConstant
boolean isConstant()
Return true if this value represents a literal or parameter.
-
getValue
java.lang.Object getValue()
If this is a constant, return its value, else return null.
-
getSQLValue
java.lang.Object getSQLValue()
If this is a constant, returns its value as it would be represented in the database in this context, else return null.
-
isPath
boolean isPath()
Return true if this value represents a persistent field traversal, such as 'this', 'address.street', or 'projectVariable.title'.
-
getClassMapping
ClassMapping getClassMapping()
If this is a path to a persistent object, return its class mapping, else return null.
-
getFieldMapping
FieldMapping getFieldMapping()
If this is a path to a persistent field, return its mapping, else return null.
-
getXPath
PCPath getXPath()
If this is an XPath, return it, else return null;
-
getXmlMapping
XMLMetaData getXmlMapping()
If this is an XPath, return XML mapping metadata, else return null;
-
requiresCast
boolean requiresCast()
return true if CAST is required for this filter value else return false.
-
-