Package com.vaadin.v7.data.util.filter
Class Compare
- java.lang.Object
-
- com.vaadin.v7.data.util.filter.Compare
-
- All Implemented Interfaces:
Container.Filter,Serializable
- Direct Known Subclasses:
Compare.Equal,Compare.Greater,Compare.GreaterOrEqual,Compare.Less,Compare.LessOrEqual
@Deprecated public abstract class Compare extends Object implements Container.Filter
Deprecated.As of 8.0, the whole filtering feature is integrated intoDataProvider. For in-memory case (ListDataProvider), use predicates as filters. For back-end DataProviders, filters are specific to the implementation.Simple container filter comparing an item property value against a given constant value. Use the nested classesCompare.Equal,Compare.Greater,Compare.Less,Compare.GreaterOrEqualandCompare.LessOrEqualinstead of this class directly. This filter also directly supports in-memory filtering. The reference and actual values must implementComparableand the class of the actual property value must be assignable from the class of the reference value.- Since:
- 6.6
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompare.EqualDeprecated.As of 8.0, the whole filtering feature is integrated intoDataProvider.static classCompare.GreaterDeprecated.As of 8.0, the whole filtering feature is integrated intoDataProvider.static classCompare.GreaterOrEqualDeprecated.As of 8.0, the whole filtering feature is integrated intoDataProvider.static classCompare.LessDeprecated.As of 8.0, the whole filtering feature is integrated intoDataProvider.static classCompare.LessOrEqualDeprecated.As of 8.0, the whole filtering feature is integrated intoDataProvider.static classCompare.OperationDeprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanappliesToProperty(Object propertyId)Deprecated.Check if a change in the value of a property can affect the filtering result.protected intcompareValue(Object value1)Deprecated.booleanequals(Object obj)Deprecated.Compare.OperationgetOperation()Deprecated.Returns the comparison operation.ObjectgetPropertyId()Deprecated.Returns the property id of the property to compare against the fixed value.ObjectgetValue()Deprecated.Returns the value to compare the property against.inthashCode()Deprecated.booleanpassesFilter(Object itemId, Item item)Deprecated.Check if an item passes the filter (in-memory filtering).
-
-
-
Method Detail
-
passesFilter
public boolean passesFilter(Object itemId, Item item)
Deprecated.Description copied from interface:Container.FilterCheck if an item passes the filter (in-memory filtering).- Specified by:
passesFilterin interfaceContainer.Filter- Parameters:
itemId- identifier of the item being filtered; may be null when the item is being added to the containeritem- the item being filtered- Returns:
- true if the item is accepted by this filter
-
compareValue
protected int compareValue(Object value1)
Deprecated.
-
appliesToProperty
public boolean appliesToProperty(Object propertyId)
Deprecated.Description copied from interface:Container.FilterCheck if a change in the value of a property can affect the filtering result. May always return true, at the cost of performance. If the filter cannot determine whether it may depend on the property or not, should return true.- Specified by:
appliesToPropertyin interfaceContainer.Filter- Returns:
- true if the filtering result may/does change based on changes to the property identified by propertyId
-
getPropertyId
public Object getPropertyId()
Deprecated.Returns the property id of the property to compare against the fixed value.- Returns:
- property id (not null)
-
getOperation
public Compare.Operation getOperation()
Deprecated.Returns the comparison operation.- Returns:
Compare.Operation
-
getValue
public Object getValue()
Deprecated.Returns the value to compare the property against.- Returns:
- comparison reference value
-
-