Class TupleBackedMap
java.lang.Object
org.springframework.data.jpa.util.TupleBackedMap
A
Map implementation which delegates all calls to a Tuple. Depending on the provided Tuple
implementation it might return the same value for various keys of which only one will appear in the key/entry set.- Since:
- 4.0
- Author:
- Jens Schauder
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) If the key is not aStringor not a key of the backingTuplethis returnsfalse.booleancontainsValue(Object value) entrySet()@Nullable ObjectIf the key is not aStringor not a key of the backingTuplethis returnsnull.booleanisEmpty()keySet()voidintsize()static jakarta.persistence.TupleunderscoreAware(jakarta.persistence.Tuple delegate) Creates a underscore-awareTuplewrapper applyingJdbcUtils.convertPropertyNameToUnderscoreName(java.lang.String)conversion to leniently look up properties from query results whose columns follow snake-case syntax.values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
TupleBackedMap
public TupleBackedMap(jakarta.persistence.Tuple tuple)
-
-
Method Details
-
underscoreAware
public static jakarta.persistence.Tuple underscoreAware(jakarta.persistence.Tuple delegate) Creates a underscore-awareTuplewrapper applyingJdbcUtils.convertPropertyNameToUnderscoreName(java.lang.String)conversion to leniently look up properties from query results whose columns follow snake-case syntax.- Parameters:
delegate- the tuple to wrap.- Returns:
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
If the key is not aStringor not a key of the backingTuplethis returnsfalse. Otherwise this returnstrueeven when the value from the backingTupleisnull.- Specified by:
containsKeyin interfaceMap<String,Object> - Parameters:
key- the key for which to get the value from the map.- Returns:
- whether the key is an element of the backing tuple.
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
get
If the key is not aStringor not a key of the backingTuplethis returnsnull. Otherwise the value from the backingTupleis returned, which also might benull. -
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-