Class RowDocumentAccessor
java.lang.Object
org.springframework.data.relational.core.conversion.RowDocumentAccessor
Wrapper value object for a
RowDocument
to be able to access raw values by
RelationalPersistentProperty
references. The accessors will transparently resolve nested document values that
a RelationalPersistentProperty
might refer to through a path expression in field names.- Since:
- 3.2
- Author:
- Mark Paluch, Chanhyeong Cho
-
Method Summary
Modifier and TypeMethodDescriptiondocument()
Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.6, this method was not intended to be exposed publicly.boolean
get
(RelationalPersistentProperty property) Returns the value the givenRelationalPersistentProperty
refers to.int
hashCode()
boolean
hasValue
(RelationalPersistentProperty property) Returns whether the underlyingRowDocument
has a value (null or non-null) for the givenRelationalPersistentProperty
.void
put
(RelationalPersistentProperty prop, Object value) Puts the given value into the backingRowDocument
based on the coordinates defined through the givenRelationalPersistentProperty
.void
putAll
(RowDocument source) Copies all mappings from the givenRowDocument
to the underlying targetRowDocument
.toString()
-
Method Details
-
getDocument
- Returns:
- the underlying
document
.
-
putAll
Copies all mappings from the givenRowDocument
to the underlying targetRowDocument
. These mappings will replace any mappings that the target document had for any of the keys currently in the specified map.- Parameters:
source
-
-
put
Puts the given value into the backingRowDocument
based on the coordinates defined through the givenRelationalPersistentProperty
. By default, this will be the plain field name. But field names might also consist of path traversals so we might need to create intermediateRowDocument
s.- Parameters:
prop
- must not be null.value
- can be null.
-
get
Returns the value the givenRelationalPersistentProperty
refers to. By default, this will be a direct field but the method will also transparently resolve nested values theRelationalPersistentProperty
might refer to through a path expression in the field name metadata.- Parameters:
property
- must not be null.- Returns:
- can be null.
-
hasValue
Returns whether the underlyingRowDocument
has a value (null or non-null) for the givenRelationalPersistentProperty
.- Parameters:
property
- must not be null.- Returns:
- true if no non null value present.
-
document
Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.6, this method was not intended to be exposed publicly. UsegetDocument()
instead. -
equals
-
hashCode
public int hashCode() -
toString
-