svn commit: r881669 [2/2] - in /ofbiz/trunk/framework/entity/src/org/ofbiz/entity: ./ cache/ condition/ config/ connection/ datasource/ finder/ jdbc/ model/ serialize/ test/ transaction/ util/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r881669 [2/2] - in /ofbiz/trunk/framework/entity/src/org/ofbiz/entity: ./ cache/ condition/ config/ connection/ datasource/ finder/ jdbc/ model/ serialize/ test/ transaction/ util/

jleroux@apache.org
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java?rev=881669&r1=881668&r2=881669&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionFactory.java Wed Nov 18 04:54:18 2009
@@ -48,7 +48,7 @@
                         if (className == null) {
                             throw new IllegalStateException("Could not find transaction factory class name definition");
                         }
-                        Class tfClass = null;
+                        Class<?> tfClass = null;
 
                         if (className != null && className.length() > 0) {
                             try {

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataAssert.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataAssert.java?rev=881669&r1=881668&r2=881669&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataAssert.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataAssert.java Wed Nov 18 04:54:18 2009
@@ -68,12 +68,12 @@
         return rowsChecked;
     }
 
-    public static void checkValueList(List valueList, Delegator delegator, List<Object> errorMessages) throws GenericEntityException {
+    public static void checkValueList(List<GenericValue> valueList, Delegator delegator, List<Object> errorMessages) throws GenericEntityException {
         if (valueList == null) return;
 
-        Iterator valueIter = valueList.iterator();
+        Iterator<GenericValue> valueIter = valueList.iterator();
         while (valueIter.hasNext()) {
-            GenericValue checkValue = (GenericValue) valueIter.next();
+            GenericValue checkValue = valueIter.next();
             checkSingleValue(checkValue, delegator, errorMessages);
         }
     }

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java?rev=881669&r1=881668&r2=881669&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java Wed Nov 18 04:54:18 2009
@@ -20,21 +20,16 @@
 
 import java.io.File;
 import java.net.URL;
-import java.util.Collection;
 import java.util.Collections;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.StringTokenizer;
 
-import org.w3c.dom.Element;
-
 import org.ofbiz.base.component.ComponentConfig;
 import org.ofbiz.base.config.GenericConfigException;
 import org.ofbiz.base.config.MainResourceHandler;
 import org.ofbiz.base.config.ResourceHandler;
 import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
@@ -45,6 +40,7 @@
 import org.ofbiz.entity.model.ModelReader;
 import org.ofbiz.entity.model.ModelUtil;
 import org.ofbiz.entity.model.ModelViewEntity;
+import org.w3c.dom.Element;
 
 /**
  * Some utility routines for loading seed data.
@@ -80,11 +76,11 @@
         return getUrlList(helperName, componentName, datasourceInfo.readDatas);
     }
 
-    public static List<URL> getUrlList(String helperName, List readerNames) {
+    public static <E> List<URL> getUrlList(String helperName, List<E> readerNames) {
         return getUrlList(helperName, null, readerNames);
     }
 
-    public static List<URL> getUrlList(String helperName, String componentName, List readerNames) {
+    public static <E> List<URL> getUrlList(String helperName, String componentName, List<E> readerNames) {
         String paths = getPathsString(helperName);
         List<URL> urlList = new LinkedList<URL>();
 

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java?rev=881669&r1=881668&r2=881669&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java Wed Nov 18 04:54:18 2009
@@ -72,7 +72,7 @@
 
     protected org.xml.sax.Locator locator;
     protected Delegator delegator;
-    protected EntityEcaHandler ecaHandler = null;
+    protected EntityEcaHandler<?> ecaHandler = null;
     protected GenericValue currentValue = null;
     protected CharSequence currentFieldName = null;
     protected CharSequence currentFieldValue = null;

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityTypeUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityTypeUtil.java?rev=881669&r1=881668&r2=881669&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityTypeUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityTypeUtil.java Wed Nov 18 04:54:18 2009
@@ -20,7 +20,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.List;
 
 import org.ofbiz.base.util.Debug;

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java?rev=881669&r1=881668&r2=881669&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java Wed Nov 18 04:54:18 2009
@@ -53,8 +53,8 @@
 
     public static final String module = EntityUtil.class.getName();
 
-    public static Map<String, Object> makeFields(Object... args) {
-        Map<String, Object> fields = FastMap.newInstance();
+    public static <V> Map<String, V> makeFields(V... args) {
+        Map<String, V> fields = FastMap.newInstance();
         if (args != null) {
             for (int i = 0; i < args.length;) {
                 if (!(args[i] instanceof String)) throw new IllegalArgumentException("Key(" + i + "), with value(" + args[i] + ") is not a String.");

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java?rev=881669&r1=881668&r2=881669&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java Wed Nov 18 04:54:18 2009
@@ -50,8 +50,6 @@
     String nameColName;
     String idColName;
 
-    private SequenceUtil() {}
-
     public SequenceUtil(String helperName, ModelEntity seqEntity, String nameFieldName, String idFieldName) {
         this.helperName = helperName;
         this.seqEntity = seqEntity;