org.openmdx.base.collection
Class MarshallingFilterableMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by org.openmdx.base.collection.MarshallingMap
          extended by org.openmdx.base.collection.MarshallingFilterableMap
All Implemented Interfaces:
Serializable, Map, FetchSize, FilterableMap
Direct Known Subclasses:
MarshallingContainer_1

public class MarshallingFilterableMap
extends MarshallingMap
implements FilterableMap, FetchSize

A Marshalling Filterable Map

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.openmdx.base.collection.MarshallingMap
map, marshaller
 
Fields inherited from interface org.openmdx.base.collection.FetchSize
DEFAULT_FETCH_SIZE
 
Constructor Summary
MarshallingFilterableMap(CollectionMarshaller marshaller, FilterableMap container)
          Constructor
MarshallingFilterableMap(Marshaller marshaller, FilterableMap container)
          Constructor
 
Method Summary
 int getFetchSize()
          Get the proposed fetch size
 void setFetchSize(int fetchSize)
          Set the proposed fetch size
 FilterableMap subMap(Object filter)
          Selects objects matching the filter.
 List values(Object criteria)
          Applies given criteria to the elements of the container and returns the result as list.
 
Methods inherited from class org.openmdx.base.collection.MarshallingMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, remove, size, values
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

MarshallingFilterableMap

public MarshallingFilterableMap(CollectionMarshaller marshaller,
                                FilterableMap container)
Constructor

Parameters:
marshaller -
map -

MarshallingFilterableMap

public MarshallingFilterableMap(Marshaller marshaller,
                                FilterableMap container)
Constructor

Parameters:
marshaller -
map -
Method Detail

subMap

public FilterableMap subMap(Object filter)
Description copied from interface: FilterableMap
Selects objects matching the filter.

The semantics of the collection returned by this method become undefined if the backing collection (i.e., this container) is structurally modified in any way other than via the returned collection. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)

This method returns a Collection as opposed to a Set because it behaves as set in respect to object id equality, not element equality.

The acceptable filter object classes must be specified by the container implementation.

Specified by:
subMap in interface FilterableMap
Parameters:
filter - The filter to be applied to objects of this container
Returns:
A subset of this container containing the objects matching the filter.

values

public List values(Object criteria)
Description copied from interface: FilterableMap
Applies given criteria to the elements of the container and returns the result as list.

The acceptable criteria classes must be specified by the container implementation.

Specified by:
values in interface FilterableMap
Parameters:
criteria - The criteria to be applied to objects of this container; or null for all the container's elements in their default order.
Returns:
a list based on the container's elements and the given criteria.

getFetchSize

public int getFetchSize()
Description copied from interface: FetchSize
Get the proposed fetch size

Specified by:
getFetchSize in interface FetchSize
Returns:
the proposed fetch size; or DEFAULT_FETCH_SIZE if the default fetch size should be used

setFetchSize

public void setFetchSize(int fetchSize)
Description copied from interface: FetchSize
Set the proposed fetch size

Specified by:
setFetchSize in interface FetchSize
Parameters:
fetchSize - the proposed fetch size, or 0 if the default fetch size should be used


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.