Interface Lockable<PK>

All Superinterfaces:
BusinessObject<PK>

public interface Lockable<PK> extends BusinessObject<PK>
Lockable is the interface a BusinessObject must implement to be used for locking. If an owner is set, the business object is locked by him or her. Unlock will remove an owner.
Since:
Nuclos 4.10
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Lock this business object by setting the current user as owner.
    void
    lock(UID ownerId)
    Lock this business object by setting the given owner.
    void
    Unlock this business object by removing the owner.
    void
    Unlock this business object after commit by removing the owner.

    Methods inherited from interface org.nuclos.api.businessobject.BusinessObject

    getEntity, getEntityUid, getId, getVersion, isDelete, isInsert, isUpdate
  • Method Details

    • lock

      void lock() throws BusinessException
      Lock this business object by setting the current user as owner. Uses a new transaction but will not increment the version!
      Throws:
      BusinessException
    • lock

      void lock(UID ownerId) throws BusinessException
      Lock this business object by setting the given owner. Uses a new transaction but will not increment the version!
      Parameters:
      ownerId -
      Throws:
      BusinessException
    • unlock

      void unlock() throws BusinessException
      Unlock this business object by removing the owner. Uses a new transaction but will not increment the version!
      Throws:
      BusinessException
    • unlockAfterCommit

      void unlockAfterCommit() throws BusinessException
      Unlock this business object after commit by removing the owner. Uses a new transaction but will not increment the version!
      Throws:
      BusinessException