com.vaadin.data.util.filter
Class Like

java.lang.Object
  extended by com.vaadin.data.util.filter.Like
All Implemented Interfaces:
Container.Filter, Serializable

public class Like
extends Object
implements Container.Filter

See Also:
Serialized Form

Constructor Summary
Like(String propertyId, String value)
           
Like(String propertyId, String value, boolean caseSensitive)
           
 
Method Summary
 boolean appliesToProperty(Object propertyId)
          Check if a change in the value of a property can affect the filtering result.
 boolean equals(Object obj)
           
 Object getPropertyId()
           
 String getValue()
           
 int hashCode()
           
 boolean isCaseSensitive()
           
 boolean passesFilter(Object itemId, Item item)
          Check if an item passes the filter (in-memory filtering).
 void setCaseSensitive(boolean caseSensitive)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Like

public Like(String propertyId,
            String value)

Like

public Like(String propertyId,
            String value,
            boolean caseSensitive)
Method Detail

getPropertyId

public Object getPropertyId()

getValue

public String getValue()

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)

isCaseSensitive

public boolean isCaseSensitive()

passesFilter

public boolean passesFilter(Object itemId,
                            Item item)
                     throws UnsupportedOperationException
Description copied from interface: Container.Filter
Check if an item passes the filter (in-memory filtering).

Specified by:
passesFilter in interface Container.Filter
Parameters:
itemId - identifier of the item being filtered; may be null when the item is being added to the container
item - the item being filtered
Returns:
true if the item is accepted by this filter
Throws:
UnsupportedOperationException - if the filter cannot be used for in-memory filtering

appliesToProperty

public boolean appliesToProperty(Object propertyId)
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 interface Container.Filter
Returns:
true if the filtering result may/does change based on changes to the property identified by propertyId

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.