Package io.micronaut.data.model.runtime
Interface PropertyAutoPopulator<T extends java.lang.annotation.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 java.lang.annotation.Annotation> extends io.micronaut.core.order.Ordered
The interface allows automatically populating new values, potentially based on the previous value forAutoPopulated
properties.NOTE: Regarded as experimental and internal at this stage.
- Since:
- 2.3.0
- Author:
- Denis Stepanov, graemerocher
- See Also:
AutoPopulated
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
populate(RuntimePersistentProperty<?> property, java.lang.Object previousValue)
Auto-populating the property.
-
-
-
Method Detail
-
populate
@NonNull java.lang.Object populate(RuntimePersistentProperty<?> property, @Nullable java.lang.Object previousValue)
Auto-populating the property.- Parameters:
property
- the property to auto-populatepreviousValue
- the previous value, if any- Returns:
- new value
-
-