Package io.jmix.data
Interface AttributeChangesProvider
- All Known Implementing Classes:
- BaseAttributeChangesProvider,- EclipselinkAttributeChangesProvider
public interface AttributeChangesProvider
Provides information about changes in entity attributes.
- 
Method SummaryModifier and TypeMethodDescriptiongetAttributeChanges(Object entity) Returns an object describing changes in entity attributes.getChangedAttributeNames(Object entity) Returns the set of dirty attributes (changed since the last load from the database).getOldValue(Object entity, String attribute) Returns an old value of an attribute changed in the current transaction.booleanReturns true if the given entity has dirty attributes (changed since the last load from the database).booleanReturns true if at least one of the given attributes is dirty (i.e.
- 
Method Details- 
getAttributeChangesReturns an object describing changes in entity attributes.- Parameters:
- entity- entity instance
- Returns:
- dirty attribute names
 
- 
getChangedAttributeNamesReturns the set of dirty attributes (changed since the last load from the database).If the entity is new, returns all its attributes. If the entity is not persistent or not in the Managed state, returns empty set. - Parameters:
- entity- entity instance
- Returns:
- dirty attribute names
- See Also:
 
- 
isChangedReturns true if the given entity has dirty attributes (changed since the last load from the database).
 If the entity is new, returns true.
 If the entity is not persistent or not in the Managed state, returns false.- Parameters:
- entity- entity instance
- See Also:
 
- 
isChangedReturns true if at least one of the given attributes is dirty (i.e. changed since the last load from the database).If the entity is new, always returns true. If the entity is not persistent or not in the Managed state, always returns false. - Parameters:
- entity- entity instance
- attributes- attributes to check
- See Also:
 
- 
getOldValueReturns an old value of an attribute changed in the current transaction. The entity must be in the Managed state. For enum attributes returns enum value.
 You can check if the value has been changed usingisChanged(Object, String...)method.- Parameters:
- entity- entity instance
- attribute- attribute name
- Returns:
- an old value stored in the database. For a new entity returns null.
- Throws:
- IllegalArgumentException- if the entity is not persistent or not in the Managed state
- See Also:
 
 
-