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


Java GenericHelperFactory.getHelper方法代码示例

本文整理汇总了Java中org.ofbiz.entity.datasource.GenericHelperFactory.getHelper方法的典型用法代码示例。如果您正苦于以下问题:Java GenericHelperFactory.getHelper方法的具体用法?Java GenericHelperFactory.getHelper怎么用?Java GenericHelperFactory.getHelper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ofbiz.entity.datasource.GenericHelperFactory的用法示例。


在下文中一共展示了GenericHelperFactory.getHelper方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializeOneGenericHelper

import org.ofbiz.entity.datasource.GenericHelperFactory; //导入方法依赖的package包/类
private void initializeOneGenericHelper(String groupName) {
    GenericHelperInfo helperInfo = this.getGroupHelperInfo(groupName);
    if (helperInfo == null) {
        if (Debug.infoOn()) {
            Debug.logInfo("Delegator \"" + delegatorFullName + "\" NOT initializing helper for entity group \"" + groupName + "\" because the group is not associated to this delegator.", module);
        }
        return;
    }
    String helperBaseName = helperInfo.getHelperBaseName();

    if (Debug.infoOn()) {
        Debug.logInfo("Delegator \"" + delegatorFullName + "\" initializing helper \"" + helperBaseName + "\" for entity group \"" + groupName + "\".", module);
    }
    if (UtilValidate.isNotEmpty(helperInfo.getHelperFullName())) {
        // pre-load field type defs, the return value is ignored
        ModelFieldTypeReader.getModelFieldTypeReader(helperBaseName);
        // get the helper and if configured, do the datasource check
        GenericHelper helper = GenericHelperFactory.getHelper(helperInfo);

        try {
            Datasource datasource = EntityConfig.getDatasource(helperBaseName);
            if (datasource.getCheckOnStart()) {
                if (Debug.infoOn()) {
                    Debug.logInfo("Doing database check as requested in entityengine.xml with addMissing=" + datasource.getAddMissingOnStart(), module);
                }
                helper.checkDataSource(this.getModelEntityMapByGroup(groupName), null, datasource.getAddMissingOnStart());
            }
        } catch (GenericEntityException e) {
            Debug.logWarning(e, e.getMessage(), module);
        }
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:33,代码来源:GenericDelegator.java

示例2: getEntityHelper

import org.ofbiz.entity.datasource.GenericHelperFactory; //导入方法依赖的package包/类
@Override
public GenericHelper getEntityHelper(String entityName) throws GenericEntityException {
    GenericHelperInfo helperInfo = getEntityHelperInfo(entityName);

    if (helperInfo != null) {
        return GenericHelperFactory.getHelper(helperInfo);
    } else {
        throw new GenericEntityException("There is no datasource (Helper) configured for the entity-group [" + this.getEntityGroupName(entityName) + "]; was trying to find datasource (helper) for entity [" + entityName + "]");
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:11,代码来源:GenericDelegator.java

示例3: initializeOneGenericHelper

import org.ofbiz.entity.datasource.GenericHelperFactory; //导入方法依赖的package包/类
private void initializeOneGenericHelper(String groupName) {
    GenericHelperInfo helperInfo = this.getGroupHelperInfo(groupName);
    if (helperInfo == null) {
        if (Debug.infoOn()) {
            Debug.logInfo("Delegator \"" + delegatorFullName + "\" NOT initializing helper for entity group \"" + groupName + "\" because the group is not associated to this delegator.", module);
        }
        return;
    }
    String helperBaseName = helperInfo.getHelperBaseName();

    if (Debug.infoOn()) {
        Debug.logInfo("Delegator \"" + delegatorFullName + "\" initializing helper \"" + helperBaseName + "\" for entity group \"" + groupName + "\".", module);
    }
    if (UtilValidate.isNotEmpty(helperInfo.getHelperFullName())) {
        // pre-load field type defs, the return value is ignored
        ModelFieldTypeReader.getModelFieldTypeReader(helperBaseName);
        // get the helper and if configured, do the datasource check
        GenericHelper helper = GenericHelperFactory.getHelper(helperInfo);

        try {
            Datasource datasource = EntityConfigUtil.getDatasource(helperBaseName);
            if (datasource.getCheckOnStart()) {
                if (Debug.infoOn()) {
                    Debug.logInfo("Doing database check as requested in entityengine.xml with addMissing=" + datasource.getAddMissingOnStart(), module);
                }
                helper.checkDataSource(this.getModelEntityMapByGroup(groupName), null, datasource.getAddMissingOnStart());
            }
        } catch (GenericEntityException e) {
            Debug.logWarning(e, e.getMessage(), module);
        }
    }
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:33,代码来源:GenericDelegator.java

示例4: getEntityHelper

import org.ofbiz.entity.datasource.GenericHelperFactory; //导入方法依赖的package包/类
public GenericHelper getEntityHelper(String entityName) throws GenericEntityException {
    GenericHelperInfo helperInfo = getEntityHelperInfo(entityName);

    if (helperInfo != null) {
        return GenericHelperFactory.getHelper(helperInfo);
    } else {
        throw new GenericEntityException("There is no datasource (Helper) configured for the entity-group [" + this.getEntityGroupName(entityName) + "]; was trying to find datasource (helper) for entity [" + entityName + "]");
    }
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:10,代码来源:GenericDelegator.java


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