svn commit: r922725 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java

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

svn commit: r922725 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java

doogie-3
Author: doogie
Date: Sun Mar 14 02:18:42 2010
New Revision: 922725

URL: http://svn.apache.org/viewvc?rev=922725&view=rev
Log:
SequenceBank no longer uses ModelEntity at all.

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

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=922725&r1=922724&r2=922725&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 Sun Mar 14 02:18:42 2010
@@ -95,7 +95,11 @@ public class SequenceUtil {
             synchronized(this) {
                 bank = sequences.get(seqName);
                 if (bank == null) {
-                    bank = new SequenceBank(seqName, seqModelEntity, this);
+                    long bankSize = SequenceBank.defaultBankSize;
+                    if (seqModelEntity != null && seqModelEntity.getSequenceBankSize() != null) {
+                        bankSize = seqModelEntity.getSequenceBankSize().longValue();
+                    }
+                    bank = new SequenceBank(seqName, bankSize, this);
                     sequences.put(seqName, bank);
                 }
             }
@@ -118,13 +122,9 @@ public class SequenceUtil {
         SequenceUtil parentUtil;
         long bankSize;
 
-        public SequenceBank(String seqName, ModelEntity seqModelEntity, SequenceUtil parentUtil) {
+        public SequenceBank(String seqName, long bankSize, SequenceUtil parentUtil) {
             this.seqName = seqName;
             this.parentUtil = parentUtil;
-            long bankSize = defaultBankSize;
-            if (seqModelEntity != null && seqModelEntity.getSequenceBankSize() != null) {
-                bankSize = seqModelEntity.getSequenceBankSize().longValue();
-            }
             this.bankSize = bankSize;
             curSeqId = 0;
             maxSeqId = 0;