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 newBasicMapIdgiven aMapof key-value tuples. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object name) booleancontainsValue(Object value) entrySet()booleaninthashCode()static MapIdid()Factory method.static MapIdFactory method.static MapIdFactory method.booleanisEmpty()keySet()voidintsize()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, waitMethods 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 newBasicMapIdgiven aMapof 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:MapIdBuilder method that adds the value for the named property, then returnsthis. -
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
entrySet
-
equals
-
get
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
toString
-