You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2012/07/18 09:15:45 UTC
svn commit: r1362790 -
/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/
Author: adrianc
Date: Wed Jul 18 07:15:45 2012
New Revision: 1362790
URL: http://svn.apache.org/viewvc?rev=1362790&view=rev
Log:
Some trivial changes in the entity config classes - mostly JavaDocs, remove unnecessary calls to UtilValidate. No functional change.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DatasourceInfo.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DelegatorInfo.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityDataReaderInfo.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityEcaReaderInfo.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityGroupReaderInfo.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityModelReaderInfo.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/FieldTypeInfo.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/NamedInfo.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/ResourceInfo.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DatasourceInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DatasourceInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DatasourceInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DatasourceInfo.java Wed Jul 18 07:15:45 2012
@@ -26,13 +26,12 @@ import org.ofbiz.base.util.UtilXml;
import org.w3c.dom.Element;
/**
- * Misc. utility method for dealing with the entityengine.xml file
+ * A model for the <datasource> element.
*
*/
-public class DatasourceInfo {
+public class DatasourceInfo extends NamedInfo {
public static final String module = DatasourceInfo.class.getName();
- public String name;
public String helperClass;
public String fieldTypeName;
public List<? extends Element> sqlLoadPaths;
@@ -79,7 +78,7 @@ public class DatasourceInfo {
public int maxWorkerPoolSize = 1;
public DatasourceInfo(Element element) {
- this.name = element.getAttribute("name");
+ super(element);
this.helperClass = element.getAttribute("helper-class");
this.fieldTypeName = element.getAttribute("field-type-name");
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DelegatorInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DelegatorInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DelegatorInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/DelegatorInfo.java Wed Jul 18 07:15:45 2012
@@ -21,12 +21,11 @@ package org.ofbiz.entity.config;
import java.util.HashMap;
import java.util.Map;
-import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.UtilXml;
import org.w3c.dom.Element;
/**
- * Misc. utility method for dealing with the entityengine.xml file
+ * A model for the <delegator> element.
*
*/
public class DelegatorInfo extends NamedInfo {
@@ -57,15 +56,15 @@ public class DelegatorInfo extends Named
// this defaults to false, ie anything but true is false
this.useDistributedCacheClear = "true".equalsIgnoreCase(element.getAttribute("distributed-cache-clear-enabled"));
this.distributedCacheClearClassName = element.getAttribute("distributed-cache-clear-class-name");
- if (UtilValidate.isEmpty(this.distributedCacheClearClassName)) this.distributedCacheClearClassName = "org.ofbiz.entityext.cache.EntityCacheServices";
+ if (this.distributedCacheClearClassName.isEmpty()) this.distributedCacheClearClassName = "org.ofbiz.entityext.cache.EntityCacheServices";
this.distributedCacheClearUserLoginId = element.getAttribute("distributed-cache-clear-user-login-id");
- if (UtilValidate.isEmpty(this.distributedCacheClearUserLoginId)) this.distributedCacheClearUserLoginId = "system";
+ if (this.distributedCacheClearUserLoginId.isEmpty()) this.distributedCacheClearUserLoginId = "system";
this.sequencedIdPrefix = element.getAttribute("sequenced-id-prefix");
this.defaultGroupName = element.getAttribute("default-group-name");
- if (UtilValidate.isEmpty(this.defaultGroupName)) this.defaultGroupName = "org.ofbiz";
+ if (this.defaultGroupName.isEmpty()) this.defaultGroupName = "org.ofbiz";
for (Element groupMapElement: UtilXml.childElementList(element, "group-map")) {
groupMap.put(groupMapElement.getAttribute("group-name"), groupMapElement.getAttribute("datasource-name"));
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityDataReaderInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityDataReaderInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityDataReaderInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityDataReaderInfo.java Wed Jul 18 07:15:45 2012
@@ -21,7 +21,7 @@ package org.ofbiz.entity.config;
import org.w3c.dom.Element;
/**
- * Misc. utility method for dealing with the entityengine.xml file
+ * A model for the <entity-data-reader> element.
*
*/
public class EntityDataReaderInfo extends ResourceInfo {
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityEcaReaderInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityEcaReaderInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityEcaReaderInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityEcaReaderInfo.java Wed Jul 18 07:15:45 2012
@@ -21,8 +21,7 @@ package org.ofbiz.entity.config;
import org.w3c.dom.Element;
/**
- * Misc. utility method for dealing with the entityengine.xml file
- *
+ * A model for the <entity-eca-reader> element.
*/
public class EntityEcaReaderInfo extends ResourceInfo {
public EntityEcaReaderInfo(Element element) {
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityGroupReaderInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityGroupReaderInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityGroupReaderInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityGroupReaderInfo.java Wed Jul 18 07:15:45 2012
@@ -18,11 +18,10 @@
*******************************************************************************/
package org.ofbiz.entity.config;
-import org.ofbiz.base.util.UtilValidate;
import org.w3c.dom.Element;
/**
- * Misc. utility method for dealing with the entityengine.xml file
+ * A model for the <entity-group-reader> element.
*
*/
public class EntityGroupReaderInfo extends ResourceInfo {
@@ -30,8 +29,7 @@ public class EntityGroupReaderInfo exten
super(element);
String loader = element.getAttribute("loader");
String location = element.getAttribute("location");
-
- if (UtilValidate.isNotEmpty(loader) && UtilValidate.isNotEmpty(location)) {
+ if (!loader.isEmpty() && !location.isEmpty()) {
resourceElements.add(0, element);
}
}
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityModelReaderInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityModelReaderInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityModelReaderInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/EntityModelReaderInfo.java Wed Jul 18 07:15:45 2012
@@ -21,7 +21,7 @@ package org.ofbiz.entity.config;
import org.w3c.dom.Element;
/**
- * Misc. utility method for dealing with the entityengine.xml file
+ * A model for the <entity-model-reader> element.
*
*/
public class EntityModelReaderInfo extends ResourceInfo {
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/FieldTypeInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/FieldTypeInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/FieldTypeInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/FieldTypeInfo.java Wed Jul 18 07:15:45 2012
@@ -21,10 +21,11 @@ package org.ofbiz.entity.config;
import org.w3c.dom.Element;
/**
- * Misc. utility method for dealing with the entityengine.xml file
+ * A model for the <field-type> element.
*
*/
public class FieldTypeInfo extends NamedInfo {
+ // FIXME: Do not keep a reference to the DOM Element.
public Element resourceElement;
public FieldTypeInfo(Element element) {
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/NamedInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/NamedInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/NamedInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/NamedInfo.java Wed Jul 18 07:15:45 2012
@@ -21,7 +21,7 @@ package org.ofbiz.entity.config;
import org.w3c.dom.Element;
/**
- * Misc. utility method for dealing with the entityengine.xml file
+ * A base class for entity engine element models.
*
*/
public abstract class NamedInfo {
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/ResourceInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/ResourceInfo.java?rev=1362790&r1=1362789&r2=1362790&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/ResourceInfo.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/ResourceInfo.java Wed Jul 18 07:15:45 2012
@@ -26,10 +26,11 @@ import org.ofbiz.base.util.UtilXml;
import javolution.util.FastList;
/**
- * Misc. utility method for dealing with the entityengine.xml file
+ * A container for <resource> elements.
*
*/
public abstract class ResourceInfo extends NamedInfo {
+ // FIXME: Do not keep a reference to DOM Elements.
public List<Element> resourceElements = FastList.newInstance();
public ResourceInfo(Element element) {