Interface MutableStateTrackable
- All Superinterfaces:
BasicDirtyTracker
,DirtyTracker
,EntityViewProxy
- All Known Subinterfaces:
DirtyStateTrackable
public interface MutableStateTrackable extends EntityViewProxy, DirtyTracker
A dirty tracker that exposes the mutable state.
- Since:
- 1.5.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and Type Method Description void
$$_addReadOnlyParent(DirtyTracker readOnlyParent, int parentIndex)
Adds the given parent at the given parent index to the interleaved read only parents list.Object[]
$$_getMutableState()
Returns the mutable state as array.DirtyTracker
$$_getParent()
Returns the parent object at which this object is registered.int
$$_getParentIndex()
Returns the attribute index at which this object is registered on the parent.List<Object>
$$_getReadOnlyParents()
Returns an interleaved list of read only parent objects and parent indexes.void
$$_removeReadOnlyParent(DirtyTracker readOnlyParent, int parentIndex)
Removes the given parent from the given parent index from the interleaved read only parents list.void
$$_setId(Object id)
Sets the id of the object to the given value.void
$$_setIsNew(boolean isNew)
Sets whether the object should be new.void
$$_setVersion(Object version)
Sets the version of the object to the given value.Methods inherited from interface com.blazebit.persistence.view.spi.type.BasicDirtyTracker
$$_hasParent, $$_isDirty, $$_markDirty, $$_setParent, $$_unmarkDirty, $$_unsetParent
Methods inherited from interface com.blazebit.persistence.view.spi.type.DirtyTracker
$$_copyDirty, $$_getDirty, $$_getSimpleDirty, $$_isDirty, $$_replaceAttribute, $$_resetDirty, $$_setDirty
Methods inherited from interface com.blazebit.persistence.view.spi.type.EntityViewProxy
$$_getEntityViewClass, $$_getId, $$_getJpaManagedBaseClass, $$_getJpaManagedClass, $$_getVersion, $$_isNew, $$_isReference
-
Method Details
-
$$_getMutableState
Object[] $$_getMutableState()Returns the mutable state as array. Never null, contains the current object state of all mutable attributes. The order is the same as the metamodel attribute order of updatable attributes.- Returns:
- The mutable state as array
-
$$_getParent
DirtyTracker $$_getParent()Returns the parent object at which this object is registered.- Returns:
- the parent object at which this object is registered
-
$$_getReadOnlyParents
Returns an interleaved list of read only parent objects and parent indexes.- Returns:
- An interleaved list of read only parent objects and parent indexes
-
$$_addReadOnlyParent
Adds the given parent at the given parent index to the interleaved read only parents list.- Parameters:
readOnlyParent
- The read only parentparentIndex
- The parent index
-
$$_removeReadOnlyParent
Removes the given parent from the given parent index from the interleaved read only parents list.- Parameters:
readOnlyParent
- The read only parentparentIndex
- The parent index
-
$$_getParentIndex
int $$_getParentIndex()Returns the attribute index at which this object is registered on the parent.- Returns:
- the attribute index at which this object is registered on the parent
-
$$_setIsNew
void $$_setIsNew(boolean isNew)Sets whether the object should be new.- Parameters:
isNew
- Whether the object should be new
-
$$_setId
Sets the id of the object to the given value.- Parameters:
id
- The new id
-
$$_setVersion
Sets the version of the object to the given value.- Parameters:
version
- The new version
-