Search in sources :

Example 1 with SqlLoadPath

use of org.apache.ofbiz.entity.config.model.SqlLoadPath in project ofbiz-framework by apache.

the class EntityDataLoader method getPathsString.

public static String getPathsString(String helperName) {
    StringBuilder pathBuffer = new StringBuilder();
    if (UtilValidate.isNotEmpty(helperName)) {
        Datasource datasourceInfo = EntityConfig.getDatasource(helperName);
        for (SqlLoadPath sqlLoadPath : datasourceInfo.getSqlLoadPathList()) {
            String prependEnv = sqlLoadPath.getPrependEnv();
            pathBuffer.append(pathBuffer.length() == 0 ? "" : ";");
            if (UtilValidate.isNotEmpty(prependEnv)) {
                pathBuffer.append(System.getProperty(prependEnv));
                pathBuffer.append("/");
            }
            pathBuffer.append(sqlLoadPath.getPath());
        }
    }
    return pathBuffer.toString();
}
Also used : Datasource(org.apache.ofbiz.entity.config.model.Datasource) SqlLoadPath(org.apache.ofbiz.entity.config.model.SqlLoadPath)

Aggregations

Datasource (org.apache.ofbiz.entity.config.model.Datasource)1 SqlLoadPath (org.apache.ofbiz.entity.config.model.SqlLoadPath)1