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

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

public class DocumentDaoJpa
extends Object
implements DocumentDao

This class is the OJB implementation of the DocumentDao interface.


Field Summary
private  BusinessObjectDao businessObjectDao
           
private  DocumentAdHocService documentAdHocService
           
private  javax.persistence.EntityManager entityManager
           
private static org.apache.log4j.Logger LOG
           
 
Constructor Summary
DocumentDaoJpa(javax.persistence.EntityManager entityManager, BusinessObjectDao businessObjectDao, DocumentAdHocService documentAdHocService)
           
 
Method Summary
 Document findByDocumentHeaderId(Class clazz, String id)
          Retrieve a Document of a specific type with a given document header ID.
 List findByDocumentHeaderIds(Class clazz, List idList)
          Retrieve a List of Document instances with the given ids
 BusinessObjectDao getBusinessObjectDao()
           
 DocumentAdHocService getDocumentAdHocService()
           
 javax.persistence.EntityManager getEntityManager()
           
 void save(Document document)
           
 void saveMaintainableBusinessObject(PersistableBusinessObject businessObject)
          Deprecated. 
 void setBusinessObjectDao(BusinessObjectDao businessObjectDao)
           
 void setDocumentAdHocService(DocumentAdHocService dahs)
          Setter for injecting the DocumentAdHocService
 void setEntityManager(javax.persistence.EntityManager entityManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static org.apache.log4j.Logger LOG

businessObjectDao

private BusinessObjectDao businessObjectDao

documentAdHocService

private DocumentAdHocService documentAdHocService

entityManager

private javax.persistence.EntityManager entityManager
Constructor Detail

DocumentDaoJpa

public DocumentDaoJpa(javax.persistence.EntityManager entityManager,
                      BusinessObjectDao businessObjectDao,
                      DocumentAdHocService documentAdHocService)
Method Detail

save

public void save(Document document)
          throws org.springframework.dao.DataAccessException
Specified by:
save in interface DocumentDao
Throws:
org.springframework.dao.DataAccessException

findByDocumentHeaderId

public Document findByDocumentHeaderId(Class clazz,
                                       String id)
                                throws org.springframework.dao.DataAccessException
Retrieve a Document of a specific type with a given document header ID.

Specified by:
findByDocumentHeaderId in interface DocumentDao
Parameters:
clazz -
id -
Returns:
Document with given id
Throws:
org.springframework.dao.DataAccessException

findByDocumentHeaderIds

public List findByDocumentHeaderIds(Class clazz,
                                    List idList)
                             throws org.springframework.dao.DataAccessException
Retrieve a List of Document instances with the given ids

Specified by:
findByDocumentHeaderIds in interface DocumentDao
Parameters:
clazz -
idList -
Returns:
List
Throws:
org.springframework.dao.DataAccessException

saveMaintainableBusinessObject

@Deprecated
public void saveMaintainableBusinessObject(PersistableBusinessObject businessObject)
Deprecated. 

Deprecated method. Should use BusinessObjectService.linkAndSave() instead.


getBusinessObjectDao

public BusinessObjectDao getBusinessObjectDao()
Specified by:
getBusinessObjectDao in interface DocumentDao

setBusinessObjectDao

public void setBusinessObjectDao(BusinessObjectDao businessObjectDao)

getEntityManager

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

setEntityManager

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

getDocumentAdHocService

public DocumentAdHocService getDocumentAdHocService()
Specified by:
getDocumentAdHocService in interface DocumentDao
Returns:
the documentAdHocService

setDocumentAdHocService

public void setDocumentAdHocService(DocumentAdHocService dahs)
Setter for injecting the DocumentAdHocService

Parameters:
dahs -


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