Class FormRecordLockDao

    • Field Summary

      • Fields inherited from class de.xima.cmn.dao.AbstractDao

        entityClass, LOG
    • Constructor Summary

      Constructors 
      Constructor Description
      FormRecordLockDao()
      Creates a new instance of this DAO.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acquireLock​(IEntityContext ec, long formRecordId)
      Attempts to acquire a lock on the Vorgang with the given ID.
      Date getLockDate​(IEntityContext ec, long formRecordId)
      Checks whether the form record with the given ID is locked, and if so, returns the date when it was locked.
      boolean releaseLock​(IEntityContext ec, long formRecordId)
      Releases the lock that was acquired by IFormRecordLockDao.acquireLock(IEntityContext, long).
      • Methods inherited from class de.xima.cmn.dao.AbstractDao

        all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
      • Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao

        all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
    • Constructor Detail

      • FormRecordLockDao

        public FormRecordLockDao()
        Creates a new instance of this DAO. Normally you should use the singleton instance provided by DaoProvider.WORKFLOWTRIGGER_DAO.
    • Method Detail

      • acquireLock

        public boolean acquireLock​(IEntityContext ec,
                                   long formRecordId)
        Description copied from interface: IFormRecordLockDao
        Attempts to acquire a lock on the Vorgang with the given ID. A call to this method must be accompanied by a matching call to releaseLock once you are done with the form record.Used for example by workflow processing, to make sure that only one thread is execution a workflow task.
        Specified by:
        acquireLock in interface IFormRecordLockDao
        Parameters:
        ec - Entity context to use to access the database.
        formRecordId - ID of the form record to lock.
        Returns:
        true if the form record was locked, or false otherwise. Only when this should true should a thread proceed to process the form record.