Interface DirtyTracker

All Superinterfaces:
BasicDirtyTracker
All Known Subinterfaces:
DirtyStateTrackable, MutableStateTrackable

public interface DirtyTracker
extends BasicDirtyTracker
A dirty tracker that gives detailed dirty information about attributes.
Since:
1.5.0
Author:
Christian Beikov
  • Method Summary

    Modifier and Type Method Description
    <T> boolean $$_copyDirty​(T[] source, T[] target)
    Copies elements from the source to the target array for the dirty attribute indexes.
    long[] $$_getDirty()
    Returns the dirty bit masks as long array.
    long $$_getSimpleDirty()
    Returns 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[] $$_resetDirty()
    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 array
      target - 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

      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.
      Parameters:
      oldObject - The old object
      attributeIndex - The attribute index
      newObject - The new object