org.datanucleus.store.scostore
Interface MapStore

All Superinterfaces:
Store
All Known Implementing Classes:
AbstractMapStore, FKMapStore, JoinMapStore

public interface MapStore
extends Store

Interface representation of the backing store for a Map.


Method Summary
 void clear(StateManager ownerSM)
          Method to clear the map.
 boolean containsKey(StateManager ownerSM, java.lang.Object key)
          Accessor for whether the Map contains this key.
 boolean containsValue(StateManager ownerSM, java.lang.Object value)
          Accessor for whether the Map contains this value.
 SetStore entrySetStore()
          Accessor for the entry set for the Map.
 java.lang.Object get(StateManager ownerSM, java.lang.Object key)
          Accessor for a value from the Map.
 java.lang.String getKeyType()
          Accessor for the key type in the map.
 java.lang.String getValueType()
          Accessor for the value type in the map.
 boolean keysAreEmbedded()
          Accessor for whether the keys are embedded.
 boolean keysAreSerialised()
          Accessor for whether the keys are serialised.
 SetStore keySetStore()
          Accessor for the keys in the Map.
 java.lang.Object put(StateManager ownerSM, java.lang.Object key, java.lang.Object value)
          Method to add a value to the Map against this key.
 void putAll(StateManager ownerSM, java.util.Map m)
          Method to add a map of values to the Map.
 java.lang.Object remove(StateManager ownerSM, java.lang.Object key)
          Method to remove a value from the Map.
 boolean updateEmbeddedKey(StateManager sm, java.lang.Object key, int fieldNumber, java.lang.Object newValue)
          Method to update en embedded key in the map.
 boolean updateEmbeddedValue(StateManager sm, java.lang.Object value, int fieldNumber, java.lang.Object newValue)
          Method to update en embedded value in the map.
 boolean valuesAreEmbedded()
          Accessor for whether the values are embedded.
 boolean valuesAreSerialised()
          Accessor for whether the values are serialised.
 SetStore valueSetStore()
          Accessor for the values in the Map.
 
Methods inherited from interface org.datanucleus.store.scostore.Store
getStoreManager
 

Method Detail

getKeyType

java.lang.String getKeyType()
Accessor for the key type in the map.

Returns:
The key type.

getValueType

java.lang.String getValueType()
Accessor for the value type in the map.

Returns:
The value type.

keysAreEmbedded

boolean keysAreEmbedded()
Accessor for whether the keys are embedded.

Returns:
Whether we have embedded keys

keysAreSerialised

boolean keysAreSerialised()
Accessor for whether the keys are serialised.

Returns:
Whether we have serialised keys

valuesAreEmbedded

boolean valuesAreEmbedded()
Accessor for whether the values are embedded.

Returns:
Whether we have embedded values

valuesAreSerialised

boolean valuesAreSerialised()
Accessor for whether the values are serialised.

Returns:
Whether we have serialised values

containsValue

boolean containsValue(StateManager ownerSM,
                      java.lang.Object value)
Accessor for whether the Map contains this value.

Parameters:
ownerSM - State Manager for the Map.
value - The value to check
Returns:
Whether it is contained.

containsKey

boolean containsKey(StateManager ownerSM,
                    java.lang.Object key)
Accessor for whether the Map contains this key.

Parameters:
ownerSM - State Manager for the Map.
key - The key to check
Returns:
Whether it is contained.

get

java.lang.Object get(StateManager ownerSM,
                     java.lang.Object key)
Accessor for a value from the Map.

Parameters:
ownerSM - State Manager for the Map.
key - Key for the value.
Returns:
Value for this key.

put

java.lang.Object put(StateManager ownerSM,
                     java.lang.Object key,
                     java.lang.Object value)
Method to add a value to the Map against this key.

Parameters:
ownerSM - State Manager for the Map.
key - The key.
value - The value.
Returns:
Value that was previously against this key.

putAll

void putAll(StateManager ownerSM,
            java.util.Map m)
Method to add a map of values to the Map.

Parameters:
ownerSM - State Manager for the Map.
m - The map to add.

remove

java.lang.Object remove(StateManager ownerSM,
                        java.lang.Object key)
Method to remove a value from the Map.

Parameters:
ownerSM - State Manager for the Map.
key - Key whose value is to be removed.
Returns:
Value that was removed.

clear

void clear(StateManager ownerSM)
Method to clear the map.

Parameters:
ownerSM - State Manager for the map.

keySetStore

SetStore keySetStore()
Accessor for the keys in the Map.

Returns:
Keys for the Map.

valueSetStore

SetStore valueSetStore()
Accessor for the values in the Map.

Returns:
Values for the Map.

entrySetStore

SetStore entrySetStore()
Accessor for the entry set for the Map.

Returns:
Entry set for the Map.

updateEmbeddedKey

boolean updateEmbeddedKey(StateManager sm,
                          java.lang.Object key,
                          int fieldNumber,
                          java.lang.Object newValue)
Method to update en embedded key in the map.

Parameters:
sm - State Manager of the owner
key - The element
fieldNumber - Field to update in the key
newValue - The new value for the field
Returns:
Whether the element was modified

updateEmbeddedValue

boolean updateEmbeddedValue(StateManager sm,
                            java.lang.Object value,
                            int fieldNumber,
                            java.lang.Object newValue)
Method to update en embedded value in the map.

Parameters:
sm - State Manager of the owner
value - The element
fieldNumber - Field to update in the value
newValue - The new value for the field
Returns:
Whether the element was modified


Copyright © 2010. All Rights Reserved.