Interface DirtyTracker
- All Superinterfaces:
BasicDirtyTracker
- All Known Subinterfaces:
DirtyStateTrackable,MutableStateTrackable
A dirty tracker that gives detailed dirty information about attributes.
- Since:
- 1.5.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescription<T> boolean$$_copyDirty(T[] source, T[] target) Copies elements from the source to the target array for the dirty attribute indexes.long[]Returns the dirty bit masks as long array.longReturns the dirty bit mask as long.boolean$$_isDirty(int attributeIndex) Returns true if the attribute at the given index is dirty, false otherwise.void$$_replaceAttribute(Object oldObject, int attributeIndex, Object newObject) Replaces the attribute at the given index with the given new object if it matches the old object.long[]Returns and resets the dirty bit masks as long array.void$$_setDirty(long[] dirty) Sets the dirty state of the object.Methods inherited from interface com.blazebit.persistence.view.spi.type.BasicDirtyTracker
$$_hasParent, $$_isDirty, $$_markDirty, $$_setParent, $$_unmarkDirty, $$_unsetParent
-
Method Details
-
$$_isDirty
boolean $$_isDirty(int attributeIndex) Returns true if the attribute at the given index is dirty, false otherwise.- Parameters:
attributeIndex- The attribute index- Returns:
- true if the attribute at the given index is dirty, false otherwise
-
$$_copyDirty
<T> boolean $$_copyDirty(T[] source, T[] target) Copies elements from the source to the target array for the dirty attribute indexes.- Type Parameters:
T- The array element type- Parameters:
source- The source arraytarget- The target array- Returns:
- true if it was dirty, false otherwise
-
$$_setDirty
void $$_setDirty(long[] dirty) Sets the dirty state of the object.- Parameters:
dirty- the dirty bit masks as long array
-
$$_resetDirty
long[] $$_resetDirty()Returns and resets the dirty bit masks as long array.- Returns:
- the dirty bit masks as long array
-
$$_getDirty
long[] $$_getDirty()Returns the dirty bit masks as long array.- Returns:
- the dirty bit masks as long array
-
$$_getSimpleDirty
long $$_getSimpleDirty()Returns the dirty bit mask as long.- Returns:
- the dirty bit mask as long
-
$$_replaceAttribute
Replaces the attribute at the given index with the given new object if it matches the old object.- Parameters:
oldObject- The old objectattributeIndex- The attribute indexnewObject- The new object
-