You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2008/06/30 17:57:40 UTC

svn commit: r672802 - in /ofbiz/trunk/framework/entity/src/org/ofbiz/entity: GenericEntity.java util/SequenceUtil.java

Author: doogie
Date: Mon Jun 30 08:57:40 2008
New Revision: 672802

URL: http://svn.apache.org/viewvc?rev=672802&view=rev
Log:
Some minor 1.5 updates, generics/valueOf.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=672802&r1=672801&r2=672802&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Mon Jun 30 08:57:40 2008
@@ -928,7 +928,7 @@
     }
 
     // ======= XML Related Methods ========
-    public static Document makeXmlDocument(Collection values) {
+    public static Document makeXmlDocument(Collection<GenericValue> values) {
         Document document = UtilXml.makeEmptyXmlDocument("entity-engine-xml");
 
         if (document == null) return null;

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=672802&r1=672801&r2=672802&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 Mon Jun 30 08:57:40 2008
@@ -91,7 +91,7 @@
     }
     
     private SequenceBank getBank(String seqName, ModelEntity seqModelEntity) {
-        SequenceBank bank = (SequenceBank) sequences.get(seqName);
+        SequenceBank bank = sequences.get(seqName);
 
         if (bank == null) {
             synchronized(this) {
@@ -137,13 +137,13 @@
             }
             
             if ((curSeqId + stagger) <= maxSeqId) {
-                Long retSeqId = new Long(curSeqId);
+                Long retSeqId = Long.valueOf(curSeqId);
                 curSeqId += stagger;
                 return retSeqId;
             } else {
                 fillBank(stagger, this.seqModelEntity);
                 if ((curSeqId + stagger) <= maxSeqId) {
-                    Long retSeqId = new Long(curSeqId);
+                    Long retSeqId = Long.valueOf(curSeqId);
                     curSeqId += stagger;
                     return retSeqId;
                 } else {