Package org.springframework.data.mapping
Interface PersistentPropertyPathAccessor<T>
- All Superinterfaces:
PersistentPropertyAccessor<T>
- All Known Implementing Classes:
ConvertingPropertyAccessor
Extension of
PersistentPropertyAccessor
that is also able to obtain and set values for
PersistentPropertyPath
s.- Since:
- 2.3
- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(PersistentPropertyPath<? extends PersistentProperty<?>> path) Return the value pointed to by the givenPersistentPropertyPath
.getProperty
(PersistentPropertyPath<? extends PersistentProperty<?>> path, AccessOptions.GetOptions options) Return the value pointed to by the givenPersistentPropertyPath
.void
setProperty
(PersistentPropertyPath<? extends PersistentProperty<?>> path, Object value) Sets the given value for thePersistentProperty
pointed to by the givenPersistentPropertyPath
.void
setProperty
(PersistentPropertyPath<? extends PersistentProperty<?>> path, Object value, AccessOptions.SetOptions options) Sets the given value for thePersistentProperty
pointed to by the givenPersistentPropertyPath
considering the givenAccessOptions
.Methods inherited from interface org.springframework.data.mapping.PersistentPropertyAccessor
getBean, getProperty, setProperty
-
Method Details
-
getProperty
Return the value pointed to by the givenPersistentPropertyPath
. If the given path is empty, the wrapped bean is returned.- Parameters:
path
- must not be null.- Returns:
-
getProperty
@Nullable Object getProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, AccessOptions.GetOptions options) Return the value pointed to by the givenPersistentPropertyPath
. If the given path is empty, the wrapped bean is returned. On each path segment value lookup, the resulting value is post-processed depending on the givenAccessOptions.GetOptions
.- Parameters:
path
- must not be null.options
- must not be null.- Returns:
-
setProperty
void setProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, @Nullable Object value) Sets the given value for thePersistentProperty
pointed to by the givenPersistentPropertyPath
. The lookup of intermediate values must not yield null.- Parameters:
path
- must not be null or empty.value
- can be null.- See Also:
-
setProperty
void setProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, @Nullable Object value, AccessOptions.SetOptions options) Sets the given value for thePersistentProperty
pointed to by the givenPersistentPropertyPath
considering the givenAccessOptions
.- Parameters:
path
- must not be null.value
- must not be null.options
- must not be null.
-