org.kuali.rice.kns.dao.impl
Class MaintenanceDocumentDaoJpa

java.lang.Object
  extended by org.kuali.rice.kns.dao.impl.MaintenanceDocumentDaoJpa
All Implemented Interfaces:
MaintenanceDocumentDao

public class MaintenanceDocumentDaoJpa
extends Object
implements MaintenanceDocumentDao

This class is the JPA implementation of the MaintenanceDocumentDao interface.


Constructor Summary
MaintenanceDocumentDaoJpa()
           
 
Method Summary
 void deleteLocks(String documentNumber)
          This method deletes the locks for the given document number.
 javax.persistence.EntityManager getEntityManager()
           
 String getLockingDocumentNumber(String lockingRepresentation, String documentNumber)
          This method looks for a document that is locking the given lockingRepresentation.
 void setEntityManager(javax.persistence.EntityManager entityManager)
           
 void storeLocks(List<MaintenanceLock> maintenanceLocks)
          This method stores the given list of maintenance locks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaintenanceDocumentDaoJpa

public MaintenanceDocumentDaoJpa()
Method Detail

getLockingDocumentNumber

public String getLockingDocumentNumber(String lockingRepresentation,
                                       String documentNumber)
Description copied from interface: MaintenanceDocumentDao
This method looks for a document that is locking the given lockingRepresentation. If one is found, then it retrieves the documentNumber, and returns it.

Specified by:
getLockingDocumentNumber in interface MaintenanceDocumentDao
Parameters:
lockingRepresentation - - locking representation to check for
documentNumber - - document number to ignore, optional argument
Returns:
returns an empty string if no locking document is found, otherwise returns the documentNumber of the locking document
See Also:
MaintenanceDocumentDao.getLockingDocumentNumber(java.lang.String, java.lang.String)

deleteLocks

public void deleteLocks(String documentNumber)
Description copied from interface: MaintenanceDocumentDao
This method deletes the locks for the given document number. It is called when the document is final, thus it can be unlocked, or when the locks need to be regenerated (thus they get cleared first).

Specified by:
deleteLocks in interface MaintenanceDocumentDao
Parameters:
documentNumber - - document number whose locks should be deleted
See Also:
MaintenanceDocumentDao.deleteLocks(java.lang.String)

storeLocks

public void storeLocks(List<MaintenanceLock> maintenanceLocks)
Description copied from interface: MaintenanceDocumentDao
This method stores the given list of maintenance locks. Typically these will all be for the same document.

Specified by:
storeLocks in interface MaintenanceDocumentDao
Parameters:
maintenanceLocks - - the list of maintenance locks to be stored
See Also:
MaintenanceDocumentDao.storeLocks(java.util.List)

getEntityManager

public javax.persistence.EntityManager getEntityManager()
Returns:
the entityManager

setEntityManager

public void setEntityManager(javax.persistence.EntityManager entityManager)
Parameters:
entityManager - the entityManager to set


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.