Module spring.data.relational
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.booleanget(RelationalPersistentProperty property) Returns the value the givenRelationalPersistentPropertyrefers to.inthashCode()booleanhasValue(RelationalPersistentProperty property) Returns whether the underlyingRowDocumenthas a value (null or non-null) for the givenRelationalPersistentProperty.voidput(RelationalPersistentProperty prop, Object value) Puts the given value into the backingRowDocumentbased on the coordinates defined through the givenRelationalPersistentProperty.voidputAll(RowDocument source) Copies all mappings from the givenRowDocumentto the underlying targetRowDocument.toString()
-
Method Details
-
getDocument
- Returns:
- the underlying
document.
-
putAll
Copies all mappings from the givenRowDocumentto 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 backingRowDocumentbased 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 intermediateRowDocuments.- Parameters:
prop- must not be null.value- can be null.
-
get
Returns the value the givenRelationalPersistentPropertyrefers to. By default, this will be a direct field but the method will also transparently resolve nested values theRelationalPersistentPropertymight 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 underlyingRowDocumenthas 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
-