E
- The element type represented by the change modelChangeModel<E>
public interface SingularChangeModel<E> extends ChangeModel<E>
ChangeModel.ChangeKind
Modifier and Type | Method | Description |
---|---|---|
<K,V> MapChangeModel<K,V> |
get(MapAttribute<E,K,V> attribute) |
Returns the change model for the attribute.
|
<V,C extends java.util.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(java.lang.String attributePath) |
Returns the change model for the attribute.
|
<X> java.util.List<? extends ChangeModel<X>> |
getAll(java.lang.String attributePath) |
Returns the change model for the attribute.
|
java.util.List<ChangeModel<?>> |
getDirtyChanges() |
Returns the change models of the dirty nested attributes.
|
boolean |
isChanged(java.lang.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(java.lang.String attributePath) |
Returns whether the change model for the attribute is dirty.
|
getCurrentState, getInitialState, getKind, isDirty
java.util.List<ChangeModel<?>> getDirtyChanges()
java.lang.IllegalStateException
- if invoked on a change model that corresponds to a basic attribute<X> ChangeModel<X> get(java.lang.String attributePath)
X
- The element type of the target attribute pathattributePath
- The name of the attribute or path to sub-attributejava.lang.IllegalStateException
- if invoked on a change model that corresponds to a basic attributejava.lang.IllegalArgumentException
- if attribute of the given name does not otherwise exist<X> java.util.List<? extends ChangeModel<X>> getAll(java.lang.String attributePath)
X
- The element type of the target attribute pathattributePath
- The name of the attribute or path to sub-attributejava.lang.IllegalStateException
- if invoked on a change model that corresponds to a basic attributejava.lang.IllegalArgumentException
- 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 java.util.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(java.lang.String attributePath)
get(attributePath).isDirty()
.attributePath
- The name of the attribute or path to sub-attributejava.lang.IllegalStateException
- if invoked on a change model that corresponds to a basic attributejava.lang.IllegalArgumentException
- if attribute of the given name does not otherwise existboolean isChanged(java.lang.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-attributejava.lang.IllegalStateException
- if invoked on a change model that corresponds to a basic attributejava.lang.IllegalArgumentException
- if attribute of the given name does not otherwise existCopyright © 2014–2020 Blazebit. All rights reserved.