Interface MapStore<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear(ObjectProvider op)
Method to clear the map.boolean
containsKey(ObjectProvider op, Object key)
Accessor for whether the Map contains this key.boolean
containsValue(ObjectProvider op, Object value)
Accessor for whether the Map contains this value.SetStore
entrySetStore()
Accessor for a backing store representing the entry set for the Map.V
get(ObjectProvider op, Object key)
Accessor for a value from the Map.boolean
keysAreEmbedded()
Accessor for whether the keys are embedded.boolean
keysAreSerialised()
Accessor for whether the keys are serialised.SetStore
keySetStore()
Accessor for a backing store representing the key set for the Map.V
put(ObjectProvider op, K key, V value)
Method to add a value to the Map against this key.void
putAll(ObjectProvider op, Map<? extends K,? extends V> m)
Method to add a map of values to the Map.V
remove(ObjectProvider op, Object key)
Method to remove a value from the Map.V
remove(ObjectProvider op, Object key, Object val)
Method to remove a value from the Map.boolean
updateEmbeddedKey(ObjectProvider op, Object key, int fieldNumber, Object newValue)
Method to update an embedded key in the map.boolean
updateEmbeddedValue(ObjectProvider op, Object value, int fieldNumber, Object newValue)
Method to update an embedded value in the map.CollectionStore
valueCollectionStore()
Accessor for a backing store representing the values in the Map.boolean
valuesAreEmbedded()
Accessor for whether the values are embedded.boolean
valuesAreSerialised()
Accessor for whether the values are serialised.-
Methods inherited from interface org.datanucleus.store.types.scostore.Store
getOwnerMemberMetaData, getStoreManager
-
-
-
-
Method Detail
-
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(ObjectProvider op, Object value)
Accessor for whether the Map contains this value.- Parameters:
op
- ObjectProvider for the owner of the map.value
- The value to check- Returns:
- Whether it is contained.
-
containsKey
boolean containsKey(ObjectProvider op, Object key)
Accessor for whether the Map contains this key.- Parameters:
op
- ObjectProvider for the owner of the map.key
- The key to check- Returns:
- Whether it is contained.
-
get
V get(ObjectProvider op, Object key)
Accessor for a value from the Map.- Parameters:
op
- ObjectProvider for the owner of the map.key
- Key for the value.- Returns:
- Value for this key.
-
put
V put(ObjectProvider op, K key, V value)
Method to add a value to the Map against this key.- Parameters:
op
- ObjectProvider for the owner of the map.key
- The key.value
- The value.- Returns:
- Value that was previously against this key.
-
putAll
void putAll(ObjectProvider op, Map<? extends K,? extends V> m)
Method to add a map of values to the Map.- Parameters:
op
- ObjectProvider for the owner of the map.m
- The map to add.
-
remove
V remove(ObjectProvider op, Object key)
Method to remove a value from the Map.- Parameters:
op
- ObjectProvider for the owner of the map.key
- Key whose value is to be removed.- Returns:
- Value that was removed.
-
remove
V remove(ObjectProvider op, Object key, Object val)
Method to remove a value from the Map.- Parameters:
op
- ObjectProvider for the owner of the map.key
- Key whose value is to be removed.val
- Value for this key when the value is known (to save the lookup)- Returns:
- Value that was removed.
-
clear
void clear(ObjectProvider op)
Method to clear the map.- Parameters:
op
- ObjectProvider for the owner of the map.
-
keySetStore
SetStore keySetStore()
Accessor for a backing store representing the key set for the Map.- Returns:
- Keys for the Map.
-
valueCollectionStore
CollectionStore valueCollectionStore()
Accessor for a backing store representing the values in the Map.- Returns:
- Values for the Map.
-
entrySetStore
SetStore entrySetStore()
Accessor for a backing store representing the entry set for the Map.- Returns:
- Entry set for the Map.
-
updateEmbeddedKey
boolean updateEmbeddedKey(ObjectProvider op, Object key, int fieldNumber, Object newValue)
Method to update an embedded key in the map.- Parameters:
op
- ObjectProvider for the owner of the mapkey
- The elementfieldNumber
- Field to update in the keynewValue
- The new value for the field- Returns:
- Whether the element was modified
-
updateEmbeddedValue
boolean updateEmbeddedValue(ObjectProvider op, Object value, int fieldNumber, Object newValue)
Method to update an embedded value in the map.- Parameters:
op
- ObjectProvider for the owner of the mapvalue
- The elementfieldNumber
- Field to update in the valuenewValue
- The new value for the field- Returns:
- Whether the element was modified
-
-