com.arsdigita.search
Class FilterSpecification

java.lang.Object
  extended bycom.arsdigita.search.FilterSpecification
Direct Known Subclasses:
CategoryFilterSpecification, DateRangeFilterSpecification, ObjectTypeFilterSpecification, PartyFilterSpecification, PermissionFilterSpecification

public abstract class FilterSpecification
extends Object

A filter specification defines the parameters for a plugging into a condition defined by a filter type. For example a 'list of category ids' would be used in a 'restrict by category' filter condition.. These values are typically obtained from the user via a web form.

See Also:
FilterType

Constructor Summary
protected FilterSpecification(Object[] values, FilterType type)
          Creates a new filter specification, initializing the value map from the array of values.
 
Method Summary
 boolean equals(Object o)
          Two filter specifications are considered equal if they refer to the same filter type and their parameter sets contain the same (key, value) pairs
protected  Object get(String key)
          Get the values for the filter specification
 FilterType getType()
          Get the filter type
 int hashCode()
          Returns a hashcode compatible with the definition of the equals() method
protected  void set(String key, Object value)
          Set the value for the specified key
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterSpecification

protected FilterSpecification(Object[] values,
                              FilterType type)
Creates a new filter specification, initializing the value map from the array of values. The values array should have an even number of elements, the off elements are String keys, the even eleements are the corresponding Object values.

Parameters:
type - the filter type
values - the values for the filter type
Method Detail

get

protected Object get(String key)
Get the values for the filter specification

Parameters:
key - the value
Returns:
the filter values

set

protected void set(String key,
                   Object value)
Set the value for the specified key

Parameters:
key - the key
value - the value

getType

public FilterType getType()
Get the filter type

Returns:
the filter type

equals

public boolean equals(Object o)
Two filter specifications are considered equal if they refer to the same filter type and their parameter sets contain the same (key, value) pairs


hashCode

public int hashCode()
Returns a hashcode compatible with the definition of the equals() method



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC