Class BwDbentityWrapper<T extends BwDbentity>

Type Parameters:
T -
All Implemented Interfaces:
Serializable, Comparable, EntityWrapper<T>, org.bedework.util.logging.Logged

public abstract class BwDbentityWrapper<T extends BwDbentity> extends BwDbentity implements EntityWrapper<T>
Base class for wrappers. These classes can be extended to protect methods of the wrapped class and to carry out validation and change tracking.
Author:
Mike Douglass
See Also:
  • Field Details

  • Constructor Details

    • BwDbentityWrapper

      public BwDbentityWrapper(T entity)
      Constructor
      Parameters:
      entity -
  • Method Details

    • putEntity

      public void putEntity(T val)
      Specified by:
      putEntity in interface EntityWrapper<T extends BwDbentity>
    • fetchEntity

      public T fetchEntity()
      Description copied from interface: EntityWrapper
      Avoid get and set so we don't expose the underlying object to request streams.
      Specified by:
      fetchEntity in interface EntityWrapper<T extends BwDbentity>
      Returns:
      T
    • getSeq

      public int getSeq()
      Description copied from class: BwDbentity
      Get the entity seq
      Overrides:
      getSeq in class BwDbentity
      Returns:
      int the entity seq
    • setSizeChange

      public void setSizeChange(int val)
      Used to track size changes.
      Parameters:
      val -
    • getSizeChange

      public int getSizeChange()
      Returns:
      int last byte size change
    • updateSizeChange

      public void updateSizeChange(int val)
      Update the size change with the given increment
      Parameters:
      val -
    • updateSizeChange

      public void updateSizeChange(BwDbentity oldVal, BwDbentity newVal)
      Update the size change with the size difference
      Parameters:
      oldVal -
      newVal -