Holger's
Java API

com.antelmann.mgmt
Class SimpleEntityFilter<T extends Entity>

java.lang.Object
  extended by com.antelmann.mgmt.SimpleEntityFilter<T>
All Implemented Interfaces:
Filter<T>, Serializable

public class SimpleEntityFilter<T extends Entity>
extends Object
implements Filter<T>, Serializable

filters on the properties of an entity based on simple equality of key/value pairs. This filter also supports Range objects as values for a restriction.

Author:
Holger Antelmann
See Also:
Range, Serialized Form

Constructor Summary
SimpleEntityFilter(Map<String,Object> restrictions)
           
SimpleEntityFilter(String key, Object value)
           
 
Method Summary
 boolean accept(T entity)
           
 Map<String,Object> getRestrictions()
          provides direct access to the embedded restrictions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleEntityFilter

public SimpleEntityFilter(String key,
                          Object value)

SimpleEntityFilter

public SimpleEntityFilter(Map<String,Object> restrictions)
Method Detail

getRestrictions

public Map<String,Object> getRestrictions()
provides direct access to the embedded restrictions


accept

public boolean accept(T entity)
               throws ClassCastException
Specified by:
accept in interface Filter<T extends Entity>
Throws:
ClassCastException - if the property value doesn't correspond to a Range's expected object


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads