You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2021/07/06 15:02:26 UTC

[ofbiz-framework] branch trunk updated: Improved: Cleaned commented code from entity component (OFBIZ-8038) (#308)

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new dbaed18  Improved: Cleaned commented code from entity component (OFBIZ-8038) (#308)
dbaed18 is described below

commit dbaed189b17b34da9133a52f569e09e2e07ae6f9
Author: Eugen Stan <ie...@apache.org>
AuthorDate: Tue Jul 6 18:02:20 2021 +0300

    Improved: Cleaned commented code from entity component (OFBIZ-8038) (#308)
---
 .../ofbiz/entity/condition/EntityOperator.java     |  7 --
 .../ofbiz/entity/config/model/Datasource.java      |  7 --
 .../ofbiz/entity/config/model/EntityConfig.java    |  5 --
 .../entity/datasource/GenericHelperFactory.java    |  1 -
 .../org/apache/ofbiz/entity/jdbc/DatabaseUtil.java | 21 -----
 .../org/apache/ofbiz/entity/jdbc/SQLProcessor.java | 22 -----
 .../org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java  |  9 --
 .../org/apache/ofbiz/entity/model/ModelEntity.java | 52 ------------
 .../ofbiz/entity/model/ModelEntityChecker.java     |  8 --
 .../org/apache/ofbiz/entity/model/ModelReader.java |  6 +-
 .../apache/ofbiz/entity/test/EntityTestSuite.java  | 96 ----------------------
 .../apache/ofbiz/entity/util/EntityDataLoader.java | 22 -----
 .../apache/ofbiz/entity/util/EntityTypeUtil.java   | 19 -----
 13 files changed, 1 insertion(+), 274 deletions(-)

diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java
index b226764..b43951d 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java
@@ -365,13 +365,6 @@ public abstract class EntityOperator<L, R> implements Serializable {
         }
     }
 
-
-    /*
-    public T eval(Delegator delegator, Map<String, ? extends Object> map, Object lhs, Object rhs) {
-        return castBoolean(mapMatches(delegator, map, lhs, rhs));
-    }
-    */
-
     public abstract boolean isEmpty(L lhs, R rhs);
     public abstract boolean mapMatches(Delegator delegator, Map<String, ? extends Object> map, L lhs, R rhs);
     public abstract void validateSql(ModelEntity entity, L lhs, R rhs) throws GenericModelException;
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/config/model/Datasource.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/config/model/Datasource.java
index 977c8b0..2244d77 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/config/model/Datasource.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/config/model/Datasource.java
@@ -35,13 +35,6 @@ import org.w3c.dom.Element;
 @ThreadSafe
 public final class Datasource {
 
-/*
-    public static final int TYPE_JNDI_JDBC = 1;
-    public static final int TYPE_INLINE_JDBC = 2;
-    public static final int TYPE_TYREX_DATA_SOURCE = 3;
-    public static final int TYPE_OTHER = 4;
-*/
-
     private final String name; // type = xs:string
     private final String helperClass; // type = xs:string
     private final String fieldTypeName; // type = xs:string
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/config/model/EntityConfig.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/config/model/EntityConfig.java
index a512598..1861e17 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/config/model/EntityConfig.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/config/model/EntityConfig.java
@@ -326,11 +326,6 @@ public final class EntityConfig {
     }
 
     /** Returns the specified <code>&lt;datasource&gt;</code> child element or <code>null</code> if it does not exist. */
-    /*
-    public Datasource getDatasource(String name) {
-        return this.datasourceMap.get(name);
-    }
-    */
     public static Datasource getDatasource(String name) {
         try {
             return getInstance().datasourceMap.get(name);
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperFactory.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperFactory.java
index 52d296a..3f95d11 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperFactory.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperFactory.java
@@ -35,7 +35,6 @@ public class GenericHelperFactory {
 
     private static final String MODULE = GenericHelperFactory.class.getName();
 
-    // protected static UtilCache helperCache = new UtilCache("entity.GenericHelpers", 0, 0);
     protected static final Map<String, GenericHelper> HELPER_CACHE = new HashMap<>();
 
     public static GenericHelper getHelper(GenericHelperInfo helperInfo) {
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
index 531d723..b64c8cc 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
@@ -1365,20 +1365,6 @@ public class DatabaseUtil {
             return null;
         }
 
-        /*
-         * try { if (Debug.infoOn()) Debug.logInfo("Database Product Name is " +
-         * dbData.getDatabaseProductName(), MODULE); if (Debug.infoOn())
-         * Debug.logInfo("Database Product Version is " +
-         * dbData.getDatabaseProductVersion(), MODULE); } catch (SQLException e) {
-         * Debug.logWarning("Unable to get Database name & version information",
-         * MODULE); } try { if (Debug.infoOn()) Debug.logInfo("Database Driver Name is "
-         * + dbData.getDriverName(), MODULE); if (Debug.infoOn())
-         * Debug.logInfo("Database Driver Version is " + dbData.getDriverVersion(),
-         * MODULE); } catch (SQLException e) {
-         * Debug.logWarning("Unable to get Driver name & version information", MODULE);
-         * }
-         */
-
         if (Debug.infoOn()) {
             Debug.logInfo("Getting Foreign Key (Reference) Info From Database", MODULE);
         }
@@ -1386,8 +1372,6 @@ public class DatabaseUtil {
         Map<String, Map<String, ReferenceCheckInfo>> retMap = new HashMap<>();
 
         try {
-            // ResultSet rsCols = dbData.getCrossReference(null, null, null, null, null,
-            // null);
             String lookupSchemaName = getSchemaName(dbData);
             boolean needsUpperCase = false;
             try {
@@ -1406,7 +1390,6 @@ public class DatabaseUtil {
                 String shortTableName = tableName.split("\\.").length > 0 ? tableName.split("\\.")[tableName.split(
                         "\\.").length - 1] : tableName;
                 ResultSet rsCols = dbData.getImportedKeys(null, lookupSchemaName, shortTableName);
-                // ResultSetMetaData rsMeta = rsCols.getMetaData();
 
                 Map<String, ReferenceCheckInfo> tableRefInfo = retMap.get(tableName);
                 if (tableRefInfo == null) {
@@ -1747,11 +1730,7 @@ public class DatabaseUtil {
 
         // if there is a tableType, add the TYPE arg here
         if (UtilValidate.isNotEmpty(this.datasourceInfo.getTableType())) {
-            // jaz:20101229 - This appears to be only used by mysql and now mysql has
-            // deprecated (and in 5.5.x removed) the use of the TYPE keyword. This is
-            // changed to ENGINE which is supported starting at 4.1
             sqlBuf.append(" ENGINE ");
-            //sqlBuf.append(" TYPE ");
             sqlBuf.append(this.datasourceInfo.getTableType());
         }
 
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SQLProcessor.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SQLProcessor.java
index 264f4e4..2ca159a 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SQLProcessor.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SQLProcessor.java
@@ -295,28 +295,6 @@ public class SQLProcessor implements AutoCloseable {
         // test the connection
         testConnection(connection);
 
-        /* causes problems w/ postgres ??
-        if (Debug.verboseOn()) {
-            int isoLevel = -999;
-            try {
-                isoLevel = connection.getTransactionIsolation();
-            } catch (SQLException e) {
-                Debug.logError(e, "Problems getting the connection's isolation level", MODULE);
-            }
-            if (isoLevel == Connection.TRANSACTION_NONE) {
-                if (Debug.verboseOn()) Debug.logVerbose("Transaction isolation level set to 'None'.", MODULE);
-            } else if (isoLevel == Connection.TRANSACTION_READ_COMMITTED) {
-                if (Debug.verboseOn()) Debug.logVerbose("Transaction isolation level set to 'ReadCommited'.", MODULE);
-            } else if (isoLevel == Connection.TRANSACTION_READ_UNCOMMITTED) {
-                if (Debug.verboseOn()) Debug.logVerbose("Transaction isolation level set to 'ReadUncommitted'.", MODULE);
-            } else if (isoLevel == Connection.TRANSACTION_REPEATABLE_READ) {
-                if (Debug.verboseOn()) Debug.logVerbose("Transaction isolation level set to 'RepeatableRead'.", MODULE);
-            } else if (isoLevel == Connection.TRANSACTION_SERIALIZABLE) {
-                if (Debug.verboseOn()) Debug.logVerbose("Transaction isolation level set to 'Serializable'.", MODULE);
-            }
-        }
-        */
-
         // always try to set auto commit to false, but if we can't then later on we won't commit
         try {
             if (connection.getAutoCommit()) {
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java
index 654c44a..4166dda 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java
@@ -163,10 +163,6 @@ public final class SqlJdbcUtil {
                     ModelEntity linkEntity = modelViewEntity.getMemberModelEntity(viewLink.getEntityAlias());
                     ModelEntity relLinkEntity = modelViewEntity.getMemberModelEntity(viewLink.getRelEntityAlias());
 
-                    // ModelViewEntity.ModelMemberEntity linkMemberEntity = modelViewEntity.getMemberModelMemberEntity(viewLink.getEntityAlias());
-                    // ModelViewEntity.ModelMemberEntity relLinkMemberEntity =
-                    // modelViewEntity.getMemberModelMemberEntity(viewLink.getRelEntityAlias());
-
                     if (i == 0) {
                         // this is the first referenced member alias, so keep track of it for future use...
                         restOfStatement.append(makeViewTable(linkEntity, modelFieldTypeReader, datasourceInfo));
@@ -419,10 +415,6 @@ public final class SqlJdbcUtil {
                                 + modelViewEntity.getEntityName());
                     }
 
-                    // ModelViewEntity.ModelMemberEntity linkMemberEntity = modelViewEntity.getMemberModelMemberEntity(viewLink.getEntityAlias());
-                    // ModelViewEntity.ModelMemberEntity relLinkMemberEntity =
-                    // modelViewEntity.getMemberModelMemberEntity(viewLink.getRelEntityAlias());
-
                     for (int j = 0; j < viewLink.getKeyMapsSize(); j++) {
                         ModelKeyMap keyMap = viewLink.getKeyMap(j);
                         ModelField linkField = linkEntity.getField(keyMap.getFieldName());
@@ -473,7 +465,6 @@ public final class SqlJdbcUtil {
     public static String makeOrderByClause(ModelEntity modelEntity, List<String> orderBy, boolean includeTablenamePrefix, Datasource datasourceInfo)
             throws GenericModelException {
         StringBuilder sql = new StringBuilder("");
-        // String fieldPrefix = includeTablenamePrefix ? (modelEntity.getTableName(datasourceInfo) + ".") : "";
 
         if (UtilValidate.isNotEmpty(orderBy)) {
             if (Debug.verboseOn()) {
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java
index c7b8fe6..1410aad 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntity.java
@@ -1817,25 +1817,6 @@ public class ModelEntity implements Comparable<ModelEntity>, Serializable {
         return returnString.toString();
     }
 
-    /*
-     public String httpRelationArgList(ModelRelation relation) {
-     String returnString = "";
-     if (relation.keyMaps.size() < 1) { return ""; }
-
-     int i = 0;
-     for (; i < relation.keyMaps.size() - 1; i++) {
-     ModelKeyMap keyMap = (ModelKeyMap)relation.keyMaps.get(i);
-     if (keyMap != null)
-     returnString = returnString + "\"" + tableName + "_" + keyMap.relColName + "=\" + " + ModelUtil.lowerFirstChar(relation.mainEntity.entityName)
-     + ".get" + ModelUtil.upperFirstChar(keyMap.fieldName) + "() + \"&\" + ";
-     }
-     ModelKeyMap keyMap = (ModelKeyMap)relation.keyMaps.get(i);
-     returnString = returnString + "\"" + tableName + "_" + keyMap.relColName + "=\" + " + ModelUtil.lowerFirstChar(relation.mainEntity.entityName)
-     + ".get" + ModelUtil.upperFirstChar(keyMap.fieldName) + "()";
-     return returnString;
-     }
-     */
-
     /**
      * Type name string related no mapped string.
      * @param relation the relation
@@ -1923,39 +1904,6 @@ public class ModelEntity implements Comparable<ModelEntity>, Serializable {
 
     @Override
     public int compareTo(ModelEntity otherModelEntity) {
-
-        /* This DOESN'T WORK, so forget it... using two passes
-         //sort list by fk dependencies
-
-         if (this.getEntityName().equals(otherModelEntity.getEntityName())) {
-         return 0;
-         }
-
-         //look through relations for dependencies from this entity to the other
-         Iterator relationsIter = this.getRelationsIterator();
-         while (relationsIter.hasNext()) {
-         ModelRelation modelRelation = (ModelRelation) relationsIter.next();
-
-         if ("one".equals(modelRelation.getType()) && modelRelation.getRelEntityName().equals(otherModelEntity.getEntityName())) {
-         //this entity is dependent on the other entity, so put that entity earlier in the list
-         return -1;
-         }
-         }
-
-         //look through relations for dependencies from the other to this entity
-         Iterator otherRelationsIter = otherModelEntity.getRelationsIterator();
-         while (otherRelationsIter.hasNext()) {
-         ModelRelation modelRelation = (ModelRelation) otherRelationsIter.next();
-
-         if ("one".equals(modelRelation.getType()) && modelRelation.getRelEntityName().equals(this.getEntityName())) {
-         //the other entity is dependent on this entity, so put that entity later in the list
-         return 1;
-         }
-         }
-
-         return 0;
-         */
-
         return this.getEntityName().compareTo(otherModelEntity.getEntityName());
     }
 
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java
index 2c551d8..9d31faa 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelEntityChecker.java
@@ -273,14 +273,6 @@ public final class ModelEntityChecker {
                                         + relation.getRelEntityName() + " of entity " + entity.getEntityName() + ".");
                             }
                             if (field != null && rfield != null) {
-                                //this was the old check, now more constrained
-                                // to keep things cleaner:
-                                // if (!field.getType().equals(rfield.getType())
-                                // &&
-                                // !field.getType().startsWith(rfield.getType())
-                                // &&
-                                // !rfield.getType().startsWith(field.getType()))
-                                // {
                                 if (!field.getType().equals(rfield.getType())) {
                                     warningList.add("[RelationFieldTypesDifferent] The field type (" + field.getType()
                                             + ") of " + field.getName() + " of entity " + entity.getEntityName()
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java
index 1fc7394..5bfb0f2 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java
@@ -158,7 +158,6 @@ public final class ModelReader implements Serializable {
         entityResourceHandlerMap.put(entityName, entityResourceHandler);
 
         // utilTimer.timerString(" After entityEntityName -- " + i + " --");
-        // ModelEntity entity = createModelEntity(curEntity, utilTimer);
 
         ModelEntity modelEntity = null;
         if (isEntity) {
@@ -225,8 +224,7 @@ public final class ModelReader implements Serializable {
                             throw new GenericEntityConfException("Could not get document for " + entityResourceHandler.toString());
                         }
 
-                        // utilTimer.timerString("Before getDocumentElement in " +
-                        // entityResourceHandler.toString());
+                        // utilTimer.timerString("Before getDocumentElement in " + entityResourceHandler.toString());
                         Element docElement = document.getDocumentElement();
 
                         if (docElement == null) {
@@ -413,8 +411,6 @@ public final class ModelReader implements Serializable {
                                             if (Debug.infoOn()
                                                     && !(title + curModelEntity.getEntityName()).equals(modelRelation.getTitle()
                                                     + modelRelation.getRelEntityName())) {
-                                                // String errorMsg = "Relation already exists to entity[] with title ["
-                                                // + targetTitle + "], from entity[]";
                                                 String message = "Entity [" + relatedEnt.getPackageName() + ":" + relatedEnt.getEntityName()
                                                         + "] already has identical relationship to entity [" + curModelEntity.getEntityName()
                                                         + "] title [" + title
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java
index 656b1dd..b95fc8e 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java
@@ -993,102 +993,6 @@ public class EntityTestSuite extends EntityTestCase {
         return strBufTemp.toString();
     }
 
-
-    /**
-     * This test will verify that the LIMIT and OFFSET options can work properly.
-     * Commented out because it makes the framework dependent on the content component
-     */
-    /*public void testLimitOffsetOptions() throws Exception {
-        String entityName = "Content";
-        Datasource datasourceInfo = EntityConfig.getDatasource(delegator.getEntityHelper(entityName).getHelperName());
-        if (UtilValidate.isEmpty(datasourceInfo.offsetStyle) || "none".equals(datasourceInfo.offsetStyle)) {
-            Debug.logInfo("The offset-stype configured in datasource is " + datasourceInfo.offsetStyle +  ", this test is skipped.", MODULE);
-            return;
-        } else {
-            Debug.logInfo("The offset-stype configured in datasource is " + datasourceInfo.offsetStyle +  ".", MODULE);
-        }
-        try {
-            EntityFindOptions findOptions = new EntityFindOptions();
-            long count = delegator.findCountByCondition("Content", null, null, null);
-            Debug.logInfo("Content entity has " + count + " rows", MODULE);
-            int rowsPerPage = 10;
-            // use rows/page as limit option
-            findOptions.setLimit(rowsPerPage);
-            int pages = (int) count/rowsPerPage;
-            if (count > pages * rowsPerPage) {
-                pages += 1;
-            }
-            Debug.logInfo("These rows will be displayed in " + pages + " pages, each page has " + rowsPerPage + " rows.", MODULE);
-            ModelEntity modelEntity = delegator.getModelEntity(entityName);
-
-            long start = UtilDateTime.nowTimestamp().getTime();
-            for (int page = 1; page <= pages; page++) {
-                Debug.logInfo("Page " + page + ":", MODULE);
-                // set offset option
-                findOptions.setOffset((page - 1) * rowsPerPage);
-                EntityListIterator iterator = null;
-                try {
-                    iterator = delegator.getEntityHelper(entityName).findListIteratorByCondition(modelEntity, null,
-                    null, null, UtilMisc.toList("lastUpdatedStamp DESC"), findOptions);
-                    while (iterator != null) {
-                        GenericValue gv = iterator.next();
-                        if (gv == null) {
-                            break;
-                        }
-                        Debug.logInfo(gv.getString("contentId") + ": " + gv.getString("contentName") + "
-                        (updated: " + gv.getTimestamp("lastUpdatedStamp") + ")", MODULE);
-                    }
-                } catch (GenericEntityException e) {
-                    Debug.logError(e, MODULE);
-                } finally {
-                    if (iterator != null) {
-                        iterator.close();
-                    }
-                }
-            }
-            long end = UtilDateTime.nowTimestamp().getTime();
-            long time1 = end - start;
-            Debug.logInfo("Time consumed WITH limit and offset option (ms): " + time1, MODULE);
-
-            start = UtilDateTime.nowTimestamp().getTime();
-            for (int page = 1; page <= pages; page++) {
-                Debug.logInfo("Page " + page + ":", MODULE);
-                EntityListIterator iterator = null;
-                try {
-                    iterator = ((GenericHelperDAO) delegator.getEntityHelper(entityName))
-                    .findListIteratorByCondition(modelEntity, null, null, null, UtilMisc.toList("lastUpdatedStamp DESC"), null);
-                    if (iterator == null) {
-                        continue;
-                    }
-                    iterator.setDelegator(delegator);
-                    List<GenericValue> gvs = iterator.getCompleteList();
-                    int fromIndex = (page - 1) * rowsPerPage;
-                    int toIndex = fromIndex + rowsPerPage;
-                    if (toIndex > count) {
-                        toIndex = (int) count;
-                    }
-                    gvs = gvs.subList(fromIndex, toIndex);
-                    for (GenericValue gv : gvs) {
-                        Debug.logInfo(gv.getString("contentId") + ": " + gv.getString("contentName") + "
-                        (updated: " + gv.getTimestamp("lastUpdatedStamp") + ")", MODULE);
-                    }
-                } catch (GenericEntityException e) {
-                    Debug.logError(e, MODULE);
-                } finally {
-                    if (iterator != null) {
-                        iterator.close();
-                    }
-                }
-            }
-            end = UtilDateTime.nowTimestamp().getTime();
-            long time2 = end - start;
-            Debug.logInfo("Time consumed WITHOUT limit and offset option (ms): " + time2, MODULE);
-            Debug.logInfo("Time saved (ms): " + (time2 - time1), MODULE);
-        } catch (GenericEntityException e) {
-            Debug.logError(e, MODULE);
-        }
-    }*/
-
     /**
      * Tests EntitySaxReader, verification loading data with tag create, create-update, create-replace, delete
      */
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityDataLoader.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityDataLoader.java
index 905154e..be32c9a 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityDataLoader.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityDataLoader.java
@@ -255,12 +255,6 @@ public class EntityDataLoader {
         }
 
         try {
-            /* The OLD way
-              List toBeStored = delegator.readXmlDocument(url);
-              delegator.storeAll(toBeStored);
-              rowsChanged += toBeStored.size();
-             */
-
             EntitySaxReader reader = null;
             if (txTimeout > 0) {
                 reader = new EntitySaxReader(delegator, txTimeout);
@@ -306,22 +300,6 @@ public class EntityDataLoader {
                 } catch (GenericEntityException e) {
                     errorMessages.add("[generateData] ERROR: Failed Security Generation for entity \"" + baseName + "\"");
                 }
-
-                /*
-                toStore.add(delegator.makeValue("SecurityPermission", "permissionId", baseName + "_VIEW", "description", "Permission to View a "
-                + entity.getEntityName() + " entity."));
-                toStore.add(delegator.makeValue("SecurityPermission", "permissionId", baseName + "_CREATE", "description", "Permission to Create a "
-                + entity.getEntityName() + " entity."));
-                toStore.add(delegator.makeValue("SecurityPermission", "permissionId", baseName + "_UPDATE", "description", "Permission to Update a "
-                + entity.getEntityName() + " entity."));
-                toStore.add(delegator.makeValue("SecurityPermission", "permissionId", baseName + "_DELETE", "description", "Permission to Delete a "
-                + entity.getEntityName() + " entity."));
-
-                toStore.add(delegator.makeValue("SecurityGroupPermission", "groupId", "FLEXADMIN", "permissionId", baseName + "_VIEW"));
-                toStore.add(delegator.makeValue("SecurityGroupPermission", "groupId", "FLEXADMIN", "permissionId", baseName + "_CREATE"));
-                toStore.add(delegator.makeValue("SecurityGroupPermission", "groupId", "FLEXADMIN", "permissionId", baseName + "_UPDATE"));
-                toStore.add(delegator.makeValue("SecurityGroupPermission", "groupId", "FLEXADMIN", "permissionId", baseName + "_DELETE"));
-                */
             }
         }
 
diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java
index ddd2f9a..6c18631 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java
@@ -51,25 +51,6 @@ public final class EntityTypeUtil {
         return false;
     }
 
-    /* public static boolean isType(Collection thisTypeCollection, GenericValue targetType) {
-     Iterator iter = thisTypeCollection.iterator();
-     while (iter.hasNext()) {
-     if (isType((GenericValue) iter.next(), targetType)) {
-     return true;
-     } //else keep looking
-     }
-     return false;
-     }*/
-
-    /* private static Object getTypeID(GenericValue typeValue) {
-     Collection keys = typeValue.getAllKeys();
-     if (keys.size() == 1) {
-     return keys.iterator().next();
-     } else {
-     throw new IllegalArgumentException("getTypeID expecting value with single key");
-     }
-     }*/
-
     private static GenericValue getParentType(GenericValue typeValue) {
         // assumes Parent relation is "Parent<entityName>"
         try {