当前位置: 首页>>代码示例>>Java>>正文


Java BusinessObjectDao类代码示例

本文整理汇总了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;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:BusinessObjectDaoProxy.java

示例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();
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:11,代码来源:DocumentDaoProxy.java

示例3: setBusinessObjectDaoOjb

import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public void setBusinessObjectDaoOjb(BusinessObjectDao businessObjectDaoOjb) {
	this.businessObjectDaoOjb = businessObjectDaoOjb;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:BusinessObjectDaoProxy.java

示例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();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:DocumentDaoProxy.java

示例5: DocumentDaoOjb

import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public DocumentDaoOjb(BusinessObjectDao businessObjectDao, DocumentAdHocService documentAdHocService) {
    super();
    this.businessObjectDao = businessObjectDao;
    this.documentAdHocService = documentAdHocService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:6,代码来源:DocumentDaoOjb.java

示例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;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:44,代码来源:BusinessObjectDaoProxy.java

示例7: setBusinessObjectDaoJpa

import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public void setBusinessObjectDaoJpa(BusinessObjectDao businessObjectDaoJpa) {
	this.businessObjectDaoJpa = businessObjectDaoJpa;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:4,代码来源:BusinessObjectDaoProxy.java

示例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;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:7,代码来源:DocumentDaoJpa.java

示例9: getBusinessObjectDao

import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
@Override
public BusinessObjectDao getBusinessObjectDao() {
    return businessObjectDao;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:5,代码来源:DocumentDaoJpa.java

示例10: setBusinessObjectDao

import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
public void setBusinessObjectDao(BusinessObjectDao businessObjectDao) {
    this.businessObjectDao = businessObjectDao;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:4,代码来源:DocumentDaoJpa.java

示例11: getBusinessObjectDao

import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
 * @return Returns the businessObjectDao.
 */
public BusinessObjectDao getBusinessObjectDao() {
    return businessObjectDao;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:7,代码来源:KeyValuesServiceImpl.java

示例12: setBusinessObjectDao

import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
 * @param businessObjectDao The businessObjectDao to set.
 */
public void setBusinessObjectDao(BusinessObjectDao businessObjectDao) {
    this.businessObjectDao = businessObjectDao;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:7,代码来源:KeyValuesServiceImpl.java

示例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;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:DocumentDaoOjb.java

示例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;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:DocumentDaoOjb.java

示例15: getBusinessObjectDao

import org.kuali.rice.krad.dao.BusinessObjectDao; //导入依赖的package包/类
/**
 * Gets the businessObjectDao attribute.
 *
 * @return Returns the businessObjectDao.
 */
protected BusinessObjectDao getBusinessObjectDao() {
    return businessObjectDao;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:BusinessObjectServiceImpl.java


注:本文中的org.kuali.rice.krad.dao.BusinessObjectDao类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。