Class RowDocument
java.lang.Object
org.springframework.data.relational.domain.RowDocument
Represents a tabular structure as document to enable hierarchical traversal of SQL results.
- Since:
- 3.2
- Author:
- Mark Paluch
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAppends a new entry (or overwrites an existing value atkey
).void
clear()
compute
(String key, BiFunction<? super String, ? super Object, ?> remappingFunction) computeIfAbsent
(String key, Function<? super String, ?> mappingFunction) computeIfPresent
(String key, BiFunction<? super String, ? super Object, ?> remappingFunction) boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
void
forEach
(BiConsumer<? super String, ? super Object> action) getDocument
(String key) Retrieve the value atkey
asRowDocument
.Retrieve the value atkey
asList
.Retrieve the value atkey
asMap
.getOrDefault
(Object key, Object defaultValue) int
hashCode()
boolean
isEmpty()
keySet()
static RowDocument
Factory method to create a RowDocument from a field and value.void
putIfAbsent
(String key, Object value) boolean
boolean
void
replaceAll
(BiFunction<? super String, ? super Object, ?> function) int
size()
toString()
values()
-
Constructor Details
-
RowDocument
public RowDocument() -
RowDocument
public RowDocument(int expectedSize) -
RowDocument
-
-
Method Details
-
of
Factory method to create a RowDocument from a field and value.- Parameters:
field
- the file name to use.value
- the value to use, can be null.- Returns:
-
getList
Retrieve the value atkey
asList
.- Parameters:
key
-- Returns:
- the value or null.
- Throws:
ClassCastException
- ifkey
holds a value that is not aList
.
-
getMap
Retrieve the value atkey
asMap
.- Parameters:
key
-- Returns:
- the value or null.
- Throws:
ClassCastException
- ifkey
holds a value that is not aMap
.
-
getDocument
Retrieve the value atkey
asRowDocument
.- Parameters:
key
-- Returns:
- the value or null.
- Throws:
ClassCastException
- ifkey
holds a value that is not aRowDocument
.
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<String,
Object>
-
containsValue
- Specified by:
containsValue
in interfaceMap<String,
Object>
-
get
-
put
-
append
Appends a new entry (or overwrites an existing value atkey
).- Parameters:
key
-value
-- Returns:
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode() -
getOrDefault
- Specified by:
getOrDefault
in interfaceMap<String,
Object>
-
forEach
-
replaceAll
- Specified by:
replaceAll
in interfaceMap<String,
Object>
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<String,
Object>
-
remove
-
replace
-
replace
-
computeIfAbsent
- Specified by:
computeIfAbsent
in interfaceMap<String,
Object>
-
computeIfPresent
public Object computeIfPresent(String key, BiFunction<? super String, ? super Object, ?> remappingFunction) - Specified by:
computeIfPresent
in interfaceMap<String,
Object>
-
compute
-
merge
-
toString
-