Class BackupValueHolder

    • Field Detail

      • unitOfWorkValueHolder

        protected ValueHolderInterface<?> unitOfWorkValueHolder
        Stores the original uow clone's value holder.
    • Constructor Detail

    • Method Detail

      • isPessimisticLockingValueHolder

        public boolean isPessimisticLockingValueHolder()
        Description copied from class: DatabaseValueHolder
        Answers if this valueholder is a pessimistic locking one. Such valueholders are special in that they can be triggered multiple times by different UnitsOfWork. Each time a lock query will be issued. Hence even if instantiated it may have to be instantiated again, and once instantiated all fields can not be reset. Note: Implementations of this method are not necessarily thread-safe. They must be used in a synchronizaed manner
        Specified by:
        isPessimisticLockingValueHolder in class DatabaseValueHolder
      • instantiateForUnitOfWorkValueHolder

        public Object instantiateForUnitOfWorkValueHolder​(UnitOfWorkValueHolder unitOfWorkValueHolder)
        Description copied from class: DatabaseValueHolder
        Triggers UnitOfWork valueholders directly without triggering the wrapped valueholder (this).

        When in transaction and/or for pessimistic locking the UnitOfWorkValueHolder needs to be triggered directly without triggering the wrapped valueholder. However only the wrapped valueholder knows how to trigger the indirection, i.e. it may be a batchValueHolder, and it stores all the info like the row and the query. Note: Implementations of this method are not necessarily thread-safe. They must be used in a synchronized manner

        Specified by:
        instantiateForUnitOfWorkValueHolder in class DatabaseValueHolder
      • instantiate

        public Object instantiate()
        If the original value holder was not instantiated, then first instantiate it to obtain the backup value.
        Specified by:
        instantiate in class DatabaseValueHolder
      • getUnitOfWorkValueHolder

        public ValueHolderInterface<?> getUnitOfWorkValueHolder()
        Return the original uow clone's value holder.