com.triactive.jdo.store
Interface MapStore

All Known Implementing Classes:
com.triactive.jdo.store.AbstractMapStore

public interface MapStore

Implements the backing store for a Map field.

Different implementations of MapStore employ different techniques for modeling the Java concept of a Map in a relational data store. Individual instances of MapStore are responsible for managing the storage for some Java class's Map field across all instances of that class.

Author:
Mike Martin

Method Summary
 boolean allowsNullValues()
          Indicates whether null values are allowed to be stored.
 void clearAll(java.util.Collection owners)
          Clears the maps associated with an entire group of objects.
 java.lang.Class getKeyType()
          Returns the type of keys stored in the Map fields.
 java.lang.Class getValueType()
          Returns the type of values stored in the Map fields.
 boolean isEmbeddedKey()
          Indicates whether or not keys are "embedded" in the store.
 boolean isEmbeddedValue()
          Indicates whether or not values are "embedded" in the store.
 CollectionStore keySetCollection()
          Returns a collection view of the map's key set.
 PersistentMap newMapInstance(StateManager owner)
          Returns a new persistent map representing the map associated with the given object.
 CollectionStore valuesCollection()
          Returns a collection view of the map's values.
 

Method Detail

getKeyType

public java.lang.Class getKeyType()
Returns the type of keys stored in the Map fields.


getValueType

public java.lang.Class getValueType()
Returns the type of values stored in the Map fields.


isEmbeddedKey

public boolean isEmbeddedKey()
Indicates whether or not keys are "embedded" in the store. An embedded object is stored by value (SCO), otherwise an OID reference is stored (FCO).


isEmbeddedValue

public boolean isEmbeddedValue()
Indicates whether or not values are "embedded" in the store. An embedded object is stored by value (SCO), otherwise an OID reference is stored (FCO).


allowsNullValues

public boolean allowsNullValues()
Indicates whether null values are allowed to be stored.


newMapInstance

public PersistentMap newMapInstance(StateManager owner)
Returns a new persistent map representing the map associated with the given object.

Iterators returned by the map's collection views (entrySet(), keySet(), values()) support the remove() method.

Parameters:
owner - The StateManager of the object whose set is to be returned.
Returns:
the new persistent map

clearAll

public void clearAll(java.util.Collection owners)
Clears the maps associated with an entire group of objects.

Parameters:
owners - The StateManagers of all the objects whose map is to be cleared.

keySetCollection

public CollectionStore keySetCollection()
Returns a collection view of the map's key set.


valuesCollection

public CollectionStore valuesCollection()
Returns a collection view of the map's values.



Copyright 2001-2007 The TJDO Project All Rights Reserved.