本文整理汇总了Java中org.kuali.rice.krad.dao.BusinessObjectDao类的典型用法代码示例。如果您正苦于以下问题:Java BusinessObjectDao类的具体用法?Java BusinessObjectDao怎么用?Java BusinessObjectDao使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BusinessObjectDao类属于org.kuali.rice.krad.dao包,在下文中一共展示了BusinessObjectDao类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
private BusinessObjectDao getDao(Class clazz) {
ModuleService moduleService = getKualiModuleService().getResponsibleModuleService(clazz);
if (moduleService != null) {
ModuleConfiguration moduleConfig = moduleService.getModuleConfiguration();
String dataSourceName = "";
if (moduleConfig != null) {
dataSourceName = moduleConfig.getDataSourceName();
}
if (StringUtils.isNotEmpty(dataSourceName)) {
if (boDaoValues.get(dataSourceName) != null) {
return boDaoValues.get(dataSourceName);
} else {
//using OJB
BusinessObjectDaoOjb boDaoOjb = new BusinessObjectDaoOjb(
KNSServiceLocator.getPersistenceStructureService());
boDaoOjb.setJcdAlias(dataSourceName);
// add to our cache of bo daos
boDaoValues.put(dataSourceName, boDaoOjb);
return boDaoOjb;
}
}
}
return businessObjectDaoOjb;
}
示例2: getBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.dao.DocumentDao#getBusinessObjectDao()
*/
@Override
public BusinessObjectDao getBusinessObjectDao() {
if (OrmUtils.isJpaEnabled()) {
return documentDaoJpa.getBusinessObjectDao();
}
return documentDaoOjb.getBusinessObjectDao();
}
示例3: setBusinessObjectDaoOjb
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public void setBusinessObjectDaoOjb(BusinessObjectDao businessObjectDaoOjb) {
this.businessObjectDaoOjb = businessObjectDaoOjb;
}
示例4: getBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.dao.DocumentDao#getBusinessObjectDao()
*/
@Override
public BusinessObjectDao getBusinessObjectDao() {
return documentDaoOjb.getBusinessObjectDao();
}
示例5: DocumentDaoOjb
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public DocumentDaoOjb(BusinessObjectDao businessObjectDao, DocumentAdHocService documentAdHocService) {
super();
this.businessObjectDao = businessObjectDao;
this.documentAdHocService = documentAdHocService;
}
示例6: getDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
private BusinessObjectDao getDao(Class clazz) {
ModuleService moduleService = getKualiModuleService().getResponsibleModuleService(clazz);
if (moduleService != null) {
ModuleConfiguration moduleConfig = moduleService.getModuleConfiguration();
String dataSourceName = "";
EntityManager entityManager = null;
if (moduleConfig != null) {
dataSourceName = moduleConfig.getDataSourceName();
entityManager = moduleConfig.getEntityManager();
}
if (StringUtils.isNotEmpty(dataSourceName)) {
if (boDaoValues.get(dataSourceName) != null) {
return boDaoValues.get(dataSourceName);
} else {
if (OrmUtils.isJpaAnnotated(clazz) && OrmUtils.isJpaEnabled()) {
//using JPA
if (entityManager != null) {
BusinessObjectDaoJpa boDaoJpa =
new BusinessObjectDaoJpa(entityManager, KRADServiceLocator
.getPersistenceStructureService());
// add to our cache of bo daos
boDaoValues.put(dataSourceName, boDaoJpa);
return boDaoJpa;
} else {
throw new ConfigurationException("EntityManager is null. EntityManager must be set in the Module Configuration bean in the appropriate spring beans xml. (see nested exception for details).");
}
} else {
//using OJB
BusinessObjectDaoOjb boDaoOjb = new BusinessObjectDaoOjb(
KRADServiceLocator.getPersistenceStructureService());
boDaoOjb.setJcdAlias(dataSourceName);
// add to our cache of bo daos
boDaoValues.put(dataSourceName, boDaoOjb);
return boDaoOjb;
}
}
}
}
//return businessObjectDaoJpa;
return (OrmUtils.isJpaAnnotated(clazz) && OrmUtils.isJpaEnabled()) ? businessObjectDaoJpa : businessObjectDaoOjb;
}
示例7: setBusinessObjectDaoJpa
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public void setBusinessObjectDaoJpa(BusinessObjectDao businessObjectDaoJpa) {
this.businessObjectDaoJpa = businessObjectDaoJpa;
}
示例8: DocumentDaoJpa
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public DocumentDaoJpa(EntityManager entityManager, BusinessObjectDao businessObjectDao, DocumentAdHocService documentAdHocService) {
super();
this.entityManager = entityManager;
this.businessObjectDao = businessObjectDao;
this.documentAdHocService = documentAdHocService;
}
示例9: getBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
@Override
public BusinessObjectDao getBusinessObjectDao() {
return businessObjectDao;
}
示例10: setBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public void setBusinessObjectDao(BusinessObjectDao businessObjectDao) {
this.businessObjectDao = businessObjectDao;
}
示例11: getBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
* @return Returns the businessObjectDao.
*/
public BusinessObjectDao getBusinessObjectDao() {
return businessObjectDao;
}
示例12: setBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
* @param businessObjectDao The businessObjectDao to set.
*/
public void setBusinessObjectDao(BusinessObjectDao businessObjectDao) {
this.businessObjectDao = businessObjectDao;
}
示例13: getBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
* Returns the {@link BusinessObjectDao}
* @see org.kuali.rice.krad.dao.DocumentDao#getBusinessObjectDao()
* @return the {@link BusinessObjectDao}
*/
@Override
public BusinessObjectDao getBusinessObjectDao() {
return businessObjectDao;
}
示例14: setBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
* Sets the {@link BusinessObjectDao}
* @param businessObjectDao ths {@link BusinessObjectDao}
*/
public void setBusinessObjectDao(BusinessObjectDao businessObjectDao) {
this.businessObjectDao = businessObjectDao;
}
示例15: getBusinessObjectDao
import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
* Gets the businessObjectDao attribute.
*
* @return Returns the businessObjectDao.
*/
protected BusinessObjectDao getBusinessObjectDao() {
return businessObjectDao;
}