|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.PropertyFilter
public class PropertyFilter
Used to store filter settings in the current context. A filter is
a simple expression of the form: property operator value,
ie. name = 'Nicklas' or spots > 10000.
| Constructor Summary | |
|---|---|
PropertyFilter(String property)
Create a new filter for a property. |
|
| Method Summary | |
|---|---|
Operator |
getOperator()
Get the operator to use in the filter. |
String |
getProperty()
Get the name of the property this filter is used on. |
Restriction |
getRestriction()
Create a restriction from the filter. |
String |
getValue()
Get the value to use in the filter. |
Object |
getValueAsObject()
Get the value as an object of the correct type. |
Type |
getValueType()
Get the type of the property. |
void |
setOperator(Operator operator)
Set the operator to use in the filter. |
void |
setValue(String value)
Set the value to use in the filter. |
void |
setValueType(Type valueType)
Set the type of the property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyFilter(String property)
property - The name of the property| Method Detail |
|---|
public String getProperty()
public Type getValueType()
public void setValueType(Type valueType)
valueType - The typepublic Operator getOperator()
public void setOperator(Operator operator)
public String getValue()
public void setValue(String value)
value - The value as a stringpublic Object getValueAsObject()
Type.parseString(String) is used to convert
the value.
InvalidDataException - If the string value can't be parsedpublic Restriction getRestriction()
If the property starts with a # it is a filter on annotations. The rest of
the property is the ID of the annotation type, and we use a
AnnotationSimpleRestriction object for the restriction.
If the property starts with a $ it is interpreted as a alias.property
value, ignoring the root alias of the query.
If the property starts with a @ the property is a collection of values and we always use an IN restriction, ignoring the specified operator.
The property may also start with $@.
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||