Package org.springframework.data.mapping
Class AccessOptions.GetOptions
java.lang.Object
org.springframework.data.mapping.AccessOptions.GetOptions
- Enclosing class:
- AccessOptions
Access options for getting values for property paths.
- Author:
- Oliver Drotbohm
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
How to handle null values during aPersistentPropertyPath
traversal. -
Constructor Summary
ConstructorDescriptionGetOptions
(Map<PersistentProperty<?>, Function<Object, Object>> handlers, AccessOptions.GetOptions.GetNulls nullValues) -
Method Summary
Modifier and TypeMethodDescriptionregisterCollectionHandler
(PersistentProperty<?> property, Function<? super Collection<?>, Object> handler) Registers aFunction
to handleCollection
values for the given property.registerHandler
(PersistentProperty<?> property, Class<T> type, Function<? super T, Object> handler) Registers the givenFunction
to post-process values obtained for the givenPersistentProperty
for the given type.registerHandler
(PersistentProperty<?> property, Function<Object, Object> handler) Registers aFunction
to post-process values for the given property.registerListHandler
(PersistentProperty<?> property, Function<? super List<?>, Object> handler) registerMapHandler
(PersistentProperty<?> property, Function<? super Map<?, ?>, Object> handler) registerSetHandler
(PersistentProperty<?> property, Function<? super Set<?>, Object> handler) withNullValues
(AccessOptions.GetOptions.GetNulls nullValues)
-
Constructor Details
-
GetOptions
public GetOptions(Map<PersistentProperty<?>, Function<Object, Object>> handlers, AccessOptions.GetOptions.GetNulls nullValues)
-
-
Method Details
-
getNullValues
-
withNullValues
-
registerHandler
public AccessOptions.GetOptions registerHandler(PersistentProperty<?> property, Function<Object, Object> handler) Registers aFunction
to post-process values for the given property.- Parameters:
property
- must not be null.handler
- must not be null.- Returns:
-
registerCollectionHandler
public AccessOptions.GetOptions registerCollectionHandler(PersistentProperty<?> property, Function<? super Collection<?>, Object> handler) Registers aFunction
to handleCollection
values for the given property.- Parameters:
property
- must not be null.handler
- must not be null.- Returns:
-
registerListHandler
public AccessOptions.GetOptions registerListHandler(PersistentProperty<?> property, Function<? super List<?>, Object> handler) - Parameters:
property
- must not be null.handler
- must not be null.- Returns:
-
registerSetHandler
public AccessOptions.GetOptions registerSetHandler(PersistentProperty<?> property, Function<? super Set<?>, Object> handler) - Parameters:
property
- must not be null.handler
- must not be null.- Returns:
-
registerMapHandler
public AccessOptions.GetOptions registerMapHandler(PersistentProperty<?> property, Function<? super Map<?, ?>, Object> handler) - Parameters:
property
- must not be null.handler
- must not be null.- Returns:
-
registerHandler
public <T> AccessOptions.GetOptions registerHandler(PersistentProperty<?> property, Class<T> type, Function<? super T, Object> handler) Registers the givenFunction
to post-process values obtained for the givenPersistentProperty
for the given type.- Type Parameters:
T
- the type of the value to handle.- Parameters:
property
- must not be null.type
- must not be null.handler
- must not be null.- Returns:
-