Class BasicMapId
java.lang.Object
org.springframework.data.cassandra.core.mapping.BasicMapId
Simple implementation of
MapId
.
Note: This could be extended in various cool ways, like one that takes a type and validates that the given
name corresponds to an actual field or bean property on that type. There could also be another one that uses a
CassandraPersistentEntity
and CassandraPersistentProperty
instead of a String name.
- Author:
- Matthew T. Adams, Mark Paluch
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new and emptyBasicMapId
.BasicMapId
(Map<String, Object> map) Create a newBasicMapId
given aMap
of key-value tuples. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object name) boolean
containsValue
(Object value) entrySet()
boolean
int
hashCode()
static MapId
id()
Factory method.static MapId
Factory method.static MapId
Factory method.boolean
isEmpty()
keySet()
void
int
size()
toString()
values()
Builder method that adds the value for the named property, then returnsthis
.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
BasicMapId
public BasicMapId()Create a new and emptyBasicMapId
. -
BasicMapId
Create a newBasicMapId
given aMap
of key-value tuples.- Parameters:
map
- must not be null.
-
-
Method Details
-
id
Factory method. Convenient if imported statically.- Returns:
BasicMapId
-
id
Factory method. Convenient if imported statically.- Returns:
BasicMapId
-
id
Factory method. Convenient if imported statically.- Returns:
BasicMapId
-
with
Description copied from interface:MapId
Builder method that adds the value for the named property, then returnsthis
. -
clear
public void clear() -
containsKey
- Specified by:
containsKey
in interfaceMap<String,
Object>
-
containsValue
- Specified by:
containsValue
in interfaceMap<String,
Object>
-
entrySet
-
equals
-
get
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
toString
-