You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2011/09/23 07:30:11 UTC
svn commit: r1174525 -
/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
Author: hansbak
Date: Fri Sep 23 05:30:10 2011
New Revision: 1174525
URL: http://svn.apache.org/viewvc?rev=1174525&view=rev
Log:
another small error correction to the tenant load data
Modified:
ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1174525&r1=1174524&r2=1174525&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java Fri Sep 23 05:30:10 2011
@@ -67,7 +67,6 @@ public class EntityDataLoadContainer imp
protected String directory = null;
protected List<String> files = FastList.newInstance();
protected String component = null;
- protected List<String> components = FastList.newInstance();
protected boolean useDummyFks = false;
protected boolean maintainTxs = false;
protected boolean tryInserts = false;
@@ -308,6 +307,7 @@ public class EntityDataLoadContainer imp
}
}
// load specify components
+ List<String> loadComponents = FastList.newInstance();
if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId()) && "Y".equals(UtilProperties.getPropertyValue("general.properties", "multitenant"))) {
try {
List<EntityExpr> exprs = FastList.newInstance();
@@ -317,13 +317,13 @@ public class EntityDataLoadContainer imp
Debug.logInfo("===== Begin load specify components", module);
if (UtilValidate.isEmpty(this.component)) {
for (GenericValue component : components) {
- this.components.add(component.getString("componentName"));
+ loadComponents.add(component.getString("componentName"));
//Debug.logInfo("- loaded default component : " + component.getString("componentName"), module);
}
Debug.logInfo("- Loaded components by default : " + components.size() + " components", module);
List<GenericValue> tenantComponents = delegator.findByAnd("TenantComponent", UtilMisc.toMap("tenantId", delegator.getDelegatorTenantId()), UtilMisc.toList("sequenceNum"));
for (GenericValue tenantComponent : tenantComponents) {
- this.components.add(tenantComponent.getString("componentName"));
+ loadComponents.add(tenantComponent.getString("componentName"));
//Debug.logInfo("- loaded component by tenantId : " + tenantComponent.getString("tenantId") +", component : " + tenantComponent.getString("componentName"), module);
}
Debug.logInfo("- Loaded components by tenantId : " + delegator.getDelegatorTenantId() + ", " + tenantComponents.size() + " components", module);
@@ -331,12 +331,12 @@ public class EntityDataLoadContainer imp
List<GenericValue> tenantComponents = delegator.findByAnd("TenantComponent", UtilMisc.toMap("tenantId", delegator.getDelegatorTenantId(), "componentName", this.component),
UtilMisc.toList("sequenceNum"));
for (GenericValue tenantComponent : tenantComponents) {
- this.components.add(tenantComponent.getString("componentName"));
+ loadComponents.add(tenantComponent.getString("componentName"));
//Debug.logInfo("- loaded component by tenantId : " + tenantComponent.getString("tenantId") +", component : " + tenantComponent.getString("componentName"), module);
}
Debug.logInfo("- Loaded tenantId : " + delegator.getDelegatorTenantId() + " and component : " + this.component, module);
}
- Debug.logInfo("===== Loaded : " + this.components.size() + " components", module);
+ Debug.logInfo("===== Loaded : " + loadComponents.size() + " components", module);
} catch (GenericEntityException e) {
Debug.logError(e.getMessage(), module);
}
@@ -418,11 +418,11 @@ public class EntityDataLoadContainer imp
// get the reader name URLs first
List<URL> urlList = FastList.newInstance();
- if (UtilValidate.isNotEmpty(this.components)) {
+ if (UtilValidate.isNotEmpty(loadComponents)) {
if (UtilValidate.isNotEmpty(readerNames)) {
- urlList = EntityDataLoader.getUrlByComponentList(helperInfo.getHelperBaseName(), this.components, readerNames);
+ urlList = EntityDataLoader.getUrlByComponentList(helperInfo.getHelperBaseName(), loadComponents, readerNames);
} else if (!"none".equalsIgnoreCase(this.readers)) {
- urlList = EntityDataLoader.getUrlByComponentList(helperInfo.getHelperBaseName(), this.components);
+ urlList = EntityDataLoader.getUrlByComponentList(helperInfo.getHelperBaseName(), loadComponents);
}
} else {
if (UtilValidate.isNotEmpty(readerNames)) {