Package com.vaadin.v7.data.util.filter
Class SimpleStringFilter
- java.lang.Object
-
- com.vaadin.v7.data.util.filter.SimpleStringFilter
-
- All Implemented Interfaces:
Container.Filter
,Serializable
@Deprecated public final class SimpleStringFilter 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 string filter for matching items that start with or contain a specified string. The matching can be case-sensitive or case-insensitive. This filter also directly supports in-memory filtering. When performing in-memory filtering, values of other types are converted using toString(), but other (lazy container) implementations do not need to perform such conversions and might not support values of different types. Note that this filter is modeled after the pre-6.6 filtering mechanisms, and might not be very efficient e.g. for database filtering. TODO this might still change- Since:
- 6.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleStringFilter(Object propertyId, String filterString, boolean ignoreCase, boolean onlyMatchPrefix)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
appliesToProperty(Object propertyId)
Deprecated.Check if a change in the value of a property can affect the filtering result.boolean
equals(Object obj)
Deprecated.String
getFilterString()
Deprecated.Returns the filter string.Object
getPropertyId()
Deprecated.Returns the property identifier to which this filter applies.int
hashCode()
Deprecated.boolean
isIgnoreCase()
Deprecated.Returns whether the filter is case-insensitive or case-sensitive.boolean
isOnlyMatchPrefix()
Deprecated.Returns true if the filter only applies to the beginning of the value string, false for any location in the value.boolean
passesFilter(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.Filter
Check if an item passes the filter (in-memory filtering).- Specified by:
passesFilter
in 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
-
appliesToProperty
public boolean appliesToProperty(Object propertyId)
Deprecated.Description copied from interface:Container.Filter
Check 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:
appliesToProperty
in 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 identifier to which this filter applies.- Returns:
- property id
-
getFilterString
public String getFilterString()
Deprecated.Returns the filter string. Note: this method is intended only for implementations of lazy string filters and may change in the future.- Returns:
- filter string given to the constructor
-
isIgnoreCase
public boolean isIgnoreCase()
Deprecated.Returns whether the filter is case-insensitive or case-sensitive. Note: this method is intended only for implementations of lazy string filters and may change in the future.- Returns:
- true if performing case-insensitive filtering, false for case-sensitive
-
isOnlyMatchPrefix
public boolean isOnlyMatchPrefix()
Deprecated.Returns true if the filter only applies to the beginning of the value string, false for any location in the value. Note: this method is intended only for implementations of lazy string filters and may change in the future.- Returns:
- true if checking for matches at the beginning of the value only, false if matching any part of value
-
-