Package org.springframework.data.mapping
Class AccessOptions.SetOptions
java.lang.Object
org.springframework.data.mapping.AccessOptions.SetOptions
- Enclosing class:
 - AccessOptions
 
Access options for setting values for property paths.
- Author:
 - Oliver Drotbohm
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow to propagate setting values that cross collection and map properties.static enumHow to handle intermediate null values when setting - 
Constructor Summary
ConstructorsConstructorDescriptionSetOptions(AccessOptions.SetOptions.SetNulls nullHandling, AccessOptions.SetOptions.Propagation collectionPropagation, AccessOptions.SetOptions.Propagation mapPropagation)  - 
Method Summary
Modifier and TypeMethodDescriptionbooleanpropagate(@Nullable PersistentProperty<?> property) Returns whether the given property is supposed to be propagated, i.e. if values for it are supposed to be set at all.Returns a newAccessOptionsthat will cause paths that contain null values to be skipped when setting a property.Returns a newAccessOptionsthat will cause paths that contain null values to be skipped when setting a property but a log message produced in TRACE level.Returns a newAccessOptionsthat will cause paths that contain null values to be skipped when setting a property.Shortcut to configure the sameAccessOptions.SetOptions.Propagationfor both collection and map property path segments.withCollectionPropagation(AccessOptions.SetOptions.Propagation collectionPropagation) withMapPropagation(AccessOptions.SetOptions.Propagation mapPropagation) withNullHandling(AccessOptions.SetOptions.SetNulls nullHandling)  
- 
Constructor Details
- 
SetOptions
public SetOptions(AccessOptions.SetOptions.SetNulls nullHandling, AccessOptions.SetOptions.Propagation collectionPropagation, AccessOptions.SetOptions.Propagation mapPropagation)  
 - 
 - 
Method Details
- 
withNullHandling
 - 
withCollectionPropagation
public AccessOptions.SetOptions withCollectionPropagation(AccessOptions.SetOptions.Propagation collectionPropagation)  - 
withMapPropagation
public AccessOptions.SetOptions withMapPropagation(AccessOptions.SetOptions.Propagation mapPropagation)  - 
getNullHandling
 - 
skipNulls
Returns a newAccessOptionsthat will cause paths that contain null values to be skipped when setting a property.- Returns:
 
 - 
skipAndLogNulls
Returns a newAccessOptionsthat will cause paths that contain null values to be skipped when setting a property but a log message produced in TRACE level.- Returns:
 
 - 
rejectNulls
Returns a newAccessOptionsthat will cause paths that contain null values to be skipped when setting a property.- Returns:
 
 - 
withCollectionAndMapPropagation
public AccessOptions.SetOptions withCollectionAndMapPropagation(AccessOptions.SetOptions.Propagation propagation) Shortcut to configure the sameAccessOptions.SetOptions.Propagationfor both collection and map property path segments.- Parameters:
 propagation- must not be null.- Returns:
 
 - 
propagate
Returns whether the given property is supposed to be propagated, i.e. if values for it are supposed to be set at all.- Parameters:
 property- can be null.- Returns:
 
 
 -