Package io.micronaut.data.model.runtime
Interface PropertyAutoPopulator<T extends Annotation>
- Type Parameters:
- T- the populated annotation type
- All Superinterfaces:
- io.micronaut.core.order.Ordered
- All Known Implementing Classes:
- AutoTimestampEntityEventListener,- VersionGeneratingEntityEventListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@Indexed(PropertyAutoPopulator.class)
@Internal
@FunctionalInterface
public interface PropertyAutoPopulator<T extends Annotation>
extends io.micronaut.core.order.Ordered
The interface allows automatically populating new values, potentially based on the previous value for 
AutoPopulated properties.
 NOTE: Regarded as experimental and internal at this stage.
- Since:
- 2.3.0
- Author:
- Denis Stepanov, graemerocher
- See Also:
- 
Field SummaryFields inherited from interface io.micronaut.core.order.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Method SummaryModifier and TypeMethodDescription@NonNull Objectpopulate(RuntimePersistentProperty<?> property, @Nullable Object previousValue) Auto-populating the property.Methods inherited from interface io.micronaut.core.order.OrderedgetOrder
- 
Method Details- 
populate@NonNull @NonNull Object populate(RuntimePersistentProperty<?> property, @Nullable @Nullable Object previousValue) Auto-populating the property.- Parameters:
- property- the property to auto-populate
- previousValue- the previous value, if any
- Returns:
- new value
 
 
-