public class EntityAttributeChanges
extends java.lang.Object
#addChanges(Entity entity)
method is used by EntityLog when registering
changes for the whole entity automatically.
You can add changes for some attributes by calling
addChange(String, Object)
and calling EntityLog programmatically.Modifier and Type | Field and Description |
---|---|
protected java.util.Set<com.haulmont.cuba.security.app.EntityAttributeChanges.Change> |
changes |
protected java.util.Map<java.lang.String,EntityAttributeChanges> |
embeddedChanges |
Constructor and Description |
---|
EntityAttributeChanges() |
Modifier and Type | Method and Description |
---|---|
void |
addChange(java.lang.String attributeName,
java.lang.Object oldValue)
Add change for the given entity attribute.
|
void |
addChanges(Entity entity)
Accumulates changes for the entity.
|
protected void |
addChanges(org.eclipse.persistence.sessions.changesets.ObjectChangeSet changeSet) |
void |
addEmbeddedChanges(java.lang.String attributeName,
EntityAttributeChanges changes)
Adds changes for the embedded entity attribute.
|
java.util.Set<java.lang.String> |
getAttributes() |
EntityAttributeChanges |
getEmbeddedChanges(java.lang.String attributeName) |
<T> T |
getOldValue(java.lang.String attributeName) |
<T> T |
getOldValueEx(java.lang.String attributePath) |
java.util.Set<java.lang.String> |
getOwnAttributes() |
boolean |
isChanged(java.lang.String attributeName) |
protected java.util.Set<com.haulmont.cuba.security.app.EntityAttributeChanges.Change> changes
protected java.util.Map<java.lang.String,EntityAttributeChanges> embeddedChanges
public void addChange(java.lang.String attributeName, java.lang.Object oldValue)
attributeName
- - attribute nameoldValue
- - old attribute valuepublic void addEmbeddedChanges(java.lang.String attributeName, EntityAttributeChanges changes)
attributeName
- - attribute namechanges
- - EntityAttributeChanges
changes for embedded objectpublic void addChanges(Entity entity)
public java.util.Set<java.lang.String> getOwnAttributes()
public java.util.Set<java.lang.String> getAttributes()
public EntityAttributeChanges getEmbeddedChanges(java.lang.String attributeName)
EntityAttributeChanges
for an embedded attribute.public boolean isChanged(java.lang.String attributeName)
@Nullable public <T> T getOldValue(java.lang.String attributeName)
@Nullable public <T> T getOldValueEx(java.lang.String attributePath)
protected void addChanges(org.eclipse.persistence.sessions.changesets.ObjectChangeSet changeSet)