• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java LookupDao类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.kuali.rice.krad.dao.LookupDao的典型用法代码示例。如果您正苦于以下问题:Java LookupDao类的具体用法?Java LookupDao怎么用?Java LookupDao使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

LookupDao类属于org.kuali.rice.krad.dao包,在下文中一共展示了LookupDao类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getDao

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
private LookupDao 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 (lookupDaoValues.get(dataSourceName) != null) {
                return lookupDaoValues.get(dataSourceName);
            } else {
                LookupDaoOjb classSpecificLookupDaoOjb = new LookupDaoOjb();
                classSpecificLookupDaoOjb.setJcdAlias(dataSourceName);
                classSpecificLookupDaoOjb.setPersistenceStructureService(
                        KNSServiceLocator.getPersistenceStructureService());
                classSpecificLookupDaoOjb.setDateTimeService(CoreApiServiceLocator.getDateTimeService());
                classSpecificLookupDaoOjb.setDataDictionaryService(
                        KRADServiceLocatorWeb.getDataDictionaryService());
                lookupDaoValues.put(dataSourceName, classSpecificLookupDaoOjb);
                return classSpecificLookupDaoOjb;
            }

        }
    }
    return lookupDaoOjb;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:29,
代码来源:LookupDaoProxy.java

示例2: setLookupDaoOjb

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
public void setLookupDaoOjb(LookupDao lookupDaoOjb) {
	this.lookupDaoOjb = lookupDaoOjb;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:4,
代码来源:LookupDaoProxy.java

示例3: setLookupDao

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
@Required
public void setLookupDao(LookupDao lookupDao) {
    this.lookupDao = lookupDao;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:5,
代码来源:KNSLegacyDataAdapterImpl.java

示例4: getLookupDaoOjb

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * @return Returns the lookupDao.
 */
public LookupDao getLookupDaoOjb() {
    return lookupDaoOjb;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:7,
代码来源:OleDocStoreLookupServiceImpl.java

示例5: setLookupDaoOjb

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * @param lookupDao The lookupDao to set.
 */
public void setLookupDaoOjb(LookupDao lookupDaoOjb) {
    this.lookupDaoOjb = lookupDaoOjb;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:7,
代码来源:OleDocStoreLookupServiceImpl.java

示例6: getLookupDaoOjb

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * @return Returns the lookupDao.
 */

public LookupDao getLookupDaoOjb() {
    return lookupDaoOjb;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:8,
代码来源:DocLookupServiceImpl.java

示例7: setLookupDaoOjb

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * @param lookupDao The lookupDao to set.
 */

public void setLookupDaoOjb(LookupDao lookupDaoOjb) {
    this.lookupDaoOjb = lookupDaoOjb;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:8,
代码来源:DocLookupServiceImpl.java

示例8: createCriteria

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * This method build OJB criteria from the given property value and name
 */
public static boolean createCriteria(Object businessObject, String propertyValue, String propertyName, Criteria criteria) {
    LookupDao lookupDao = SpringContext.getBean(LookupDao.class);
    return lookupDao.createCriteria(businessObject, propertyValue, propertyName, criteria);
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:8,
代码来源:OJBUtility.java

示例9: setLookupDao

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
public void setLookupDao(LookupDao lookupDao) {
    this.lookupDao = lookupDao;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:4,
代码来源:VendorContractLookupableHelperServiceImpl.java

示例10: setLookupDao

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
public void setLookupDao(final LookupDao lookupDao) {
    this.lookupDao = lookupDao;
}
 

开发者ID:kuali,
项目名称:kfs,
代码行数:4,
代码来源:TravelerDaoOjb.java

示例11: getLookupDao

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
protected LookupDao getLookupDao() {
    return lookupDao;
}
 

开发者ID:kuali,
项目名称:kfs,
代码行数:4,
代码来源:TravelerDaoOjb.java

示例12: setLookupDaoJpa

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
public void setLookupDaoJpa(LookupDao lookupDaoJpa) {
	this.lookupDaoJpa = lookupDaoJpa;
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:4,
代码来源:LookupDaoProxy.java

示例13: getDao

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
private LookupDao 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 (lookupDaoValues.get(dataSourceName) != null) {
                return lookupDaoValues.get(dataSourceName);
            } else {         
                if (OrmUtils.isJpaAnnotated(clazz) && OrmUtils.isJpaEnabled()) {
                    //using JPA       	
            	    LookupDaoJpa classSpecificLookupDaoJpa = new LookupDaoJpa();
            		if (entityManager != null) {
            			classSpecificLookupDaoJpa.setEntityManager(entityManager);
            			classSpecificLookupDaoJpa.setPersistenceStructureService(
                                KRADServiceLocator.getPersistenceStructureService());
                    	classSpecificLookupDaoJpa.setDateTimeService(CoreApiServiceLocator.getDateTimeService());
            			lookupDaoValues.put(dataSourceName, classSpecificLookupDaoJpa);
            			return classSpecificLookupDaoJpa;
            		} 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 {
		LookupDaoOjb classSpecificLookupDaoOjb = new LookupDaoOjb();
                    classSpecificLookupDaoOjb.setJcdAlias(dataSourceName);
                    classSpecificLookupDaoOjb.setPersistenceStructureService(
                            KRADServiceLocator.getPersistenceStructureService());
                    classSpecificLookupDaoOjb.setDateTimeService(CoreApiServiceLocator.getDateTimeService());
                    classSpecificLookupDaoOjb.setDataDictionaryService(
                            KRADServiceLocatorWeb.getDataDictionaryService());
                    lookupDaoValues.put(dataSourceName, classSpecificLookupDaoOjb);
                    return classSpecificLookupDaoOjb;
                }
            }

        }
    }
    //return lookupDaoJpa;
    return (OrmUtils.isJpaAnnotated(clazz) && OrmUtils.isJpaEnabled()) ? lookupDaoJpa : lookupDaoOjb;
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:47,
代码来源:LookupDaoProxy.java

示例14: getLookupDao

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * @return Returns the lookupDao.
 */
public LookupDao getLookupDao() {
    return lookupDao;
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:7,
代码来源:LookupServiceImpl.java

示例15: setLookupDao

点赞 2

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * @param lookupDao The lookupDao to set.
 */
public void setLookupDao(LookupDao lookupDao) {
    this.lookupDao = lookupDao;
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:7,
代码来源:LookupServiceImpl.java

示例16: getLookupDao

点赞 1

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * This method gets the lookupDao.
 * 
 * @return the lookupDao
 */
public LookupDao getLookupDao() {
    return lookupDao;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:9,
代码来源:BatchLookupableHelperService.java

示例17: setLookupDao

点赞 1

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * This method sets lookupDao.
 * 
 * @param lookupDao LookupDao
 */
public void setLookupDao(LookupDao lookupDao) {
    this.lookupDao = lookupDao;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:9,
代码来源:BatchLookupableHelperService.java

示例18: setLookupDao

点赞 1

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * Sets the lookupDao attribute value.
 * @param lookupDao The lookupDao to set.
 */
public void setLookupDao(LookupDao lookupDao) {
    this.lookupDao = lookupDao;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:8,
代码来源:ElectronicPaymentClaimLookupableHelperServiceImpl.java

示例19: getResultSizeFromMap

点赞 1

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * This method gets the size of a result set from the given search criteria
 *
 * @param fieldValues the input field map
 * @param businessObject the given business object
 * @return the size of a result set from the given search criteria
 */
public static Long getResultSizeFromMap(Map fieldValues, Object businessObject) {
    LookupDao lookupDao = SpringContext.getBean(LookupDao.class);
    return lookupDao.findCountByMap(businessObject, fieldValues);
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:12,
代码来源:OJBUtility.java

示例20: getResultSizeFromMap

点赞 1

import org.kuali.rice.krad.dao.LookupDao; //导入依赖的package包/类
/**
 * This method gets the size of a result set from the given search criteria
 * 
 * @param fieldValues the input field map
 * @param businessObject the given business object
 * @return the size of a result set from the given search criteria
 */
public static Long getResultSizeFromMap(Map fieldValues, Object businessObject) {
    LookupDao lookupDao = SpringContext.getBean(LookupDao.class);
    return lookupDao.findCountByMap(businessObject, fieldValues);
}
 

开发者ID:kuali,
项目名称:kfs,
代码行数:12,
代码来源:OJBUtility.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)