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 SummaryNested ClassesModifier and TypeClassDescriptionstatic enumHow to propagate setting values that cross collection and map properties.static enumHow to handle intermediate null values when setting
- 
Constructor SummaryConstructorsConstructorDescriptionSetOptions(AccessOptions.SetOptions.SetNulls nullHandling, AccessOptions.SetOptions.Propagation collectionPropagation, AccessOptions.SetOptions.Propagation mapPropagation) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanpropagate(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- 
SetOptionspublic SetOptions(AccessOptions.SetOptions.SetNulls nullHandling, AccessOptions.SetOptions.Propagation collectionPropagation, AccessOptions.SetOptions.Propagation mapPropagation) 
 
- 
- 
Method Details- 
withNullHandling
- 
withCollectionPropagationpublic AccessOptions.SetOptions withCollectionPropagation(AccessOptions.SetOptions.Propagation collectionPropagation) 
- 
withMapPropagationpublic AccessOptions.SetOptions withMapPropagation(AccessOptions.SetOptions.Propagation mapPropagation) 
- 
getNullHandling
- 
skipNullsReturns a newAccessOptionsthat will cause paths that contain null values to be skipped when setting a property.- Returns:
 
- 
skipAndLogNullsReturns 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:
 
- 
rejectNullsReturns a newAccessOptionsthat will cause paths that contain null values to be skipped when setting a property.- Returns:
 
- 
withCollectionAndMapPropagationpublic 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:
 
- 
propagateReturns 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:
 
 
-