E - The element type represented by the change modelpublic interface SingularChangeModel<E> extends ChangeModel<E>
ChangeModel.ChangeKind| Modifier and Type | Method and Description |
|---|---|
<K,V> MapChangeModel<K,V> |
get(MapAttribute<E,K,V> attribute)
Returns the change model for the attribute.
|
<V,C extends Collection<V>> |
get(PluralAttribute<E,C,V> attribute)
Returns the change model for the attribute.
|
<X> SingularChangeModel<X> |
get(SingularAttribute<E,X> attribute)
Returns the change model for the attribute.
|
<X> ChangeModel<X> |
get(String attributePath)
Returns the change model for the attribute.
|
<X> List<? extends ChangeModel<X>> |
getAll(String attributePath)
Returns the change model for the attribute.
|
List<ChangeModel<?>> |
getDirtyChanges()
Returns the change models of the dirty nested attributes.
|
boolean |
isChanged(String attributePath)
Returns whether the target attribute path was changed by updating or mutating it,
but still has the same identity regarding parent objects it is contained in.
|
boolean |
isDirty(String attributePath)
Returns whether the change model for the attribute is dirty.
|
getCurrentState, getInitialState, getKind, isDirtyList<ChangeModel<?>> getDirtyChanges()
IllegalStateException - if invoked on a change model that corresponds to a basic attribute<X> ChangeModel<X> get(String attributePath)
X - The element type of the target attribute pathattributePath - The name of the attribute or path to sub-attributeIllegalStateException - if invoked on a change model that corresponds to a basic attributeIllegalArgumentException - if attribute of the given name does not otherwise exist<X> List<? extends ChangeModel<X>> getAll(String attributePath)
X - The element type of the target attribute pathattributePath - The name of the attribute or path to sub-attributeIllegalStateException - if invoked on a change model that corresponds to a basic attributeIllegalArgumentException - if attribute of the given name does not otherwise exist<X> SingularChangeModel<X> get(SingularAttribute<E,X> attribute)
X - The element type of the singular attributeattribute - The singular attribute<V,C extends Collection<V>> PluralChangeModel<C,V> get(PluralAttribute<E,C,V> attribute)
C - The container type of the plural attributeV - The value type of the plural attributeattribute - The collection attribute<K,V> MapChangeModel<K,V> get(MapAttribute<E,K,V> attribute)
K - The key type of the map attributeV - The value type of the map attributeattribute - The map attributeboolean isDirty(String attributePath)
get(attributePath).isDirty().attributePath - The name of the attribute or path to sub-attributeIllegalStateException - if invoked on a change model that corresponds to a basic attributeIllegalArgumentException - if attribute of the given name does not otherwise existboolean isChanged(String attributePath)
true. Mutations or updates to the target object also cause true to be returned.
In all other cases, this method returns false.attributePath - The name of the attribute or path to sub-attributeIllegalStateException - if invoked on a change model that corresponds to a basic attributeIllegalArgumentException - if attribute of the given name does not otherwise existCopyright © 2014–2018 Blazebit. All rights reserved.