Package org.coliper.ibean.extension
Interface ModificationAware
-
- All Known Subinterfaces:
ModificationAwareExt
- All Known Implementing Classes:
ModificationAwareHandler
public interface ModificationAware
Extension interface that gives the possibility to check if a bean has been modified since creation or last reset of the modification flag (viaresetModified()
).
A bean is considered as modified as soon as a setter has been called, regardless if the setter call actually changed the value of the field.
If you need to know in detail which fields had been modified use sub interfaceModificationAwareExt
.This can for example used with persistence frameworks to decide if a bean has been touched in prior code and needs to be stored.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isModified()
void
resetModified()
Sets a bean to not modified.
-
-
-
Method Detail
-
isModified
boolean isModified()
- Returns:
true
if the bean is dirty, that is, if a setter has been called since creation or lastresetModified()
-
resetModified
void resetModified()
Sets a bean to not modified. If the bean was not dirty it does nothing.
-
-