[OFBiz] SVN: r7003 - trunk/framework/entity/src/org/ofbiz/entity

jaz@svn.ofbiz.org jaz at svn.ofbiz.org
Thu Mar 16 09:40:42 CST 2006


Author: jaz
Date: 2006-03-16 09:40:40 -0600 (Thu, 16 Mar 2006)
New Revision: 7003

Modified:
   trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
Log:
add ability to clone the delegator using a different name


Modified: trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
===================================================================
--- trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java	2006-03-16 15:40:09 UTC (rev 7002)
+++ trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java	2006-03-16 15:40:40 UTC (rev 7003)
@@ -2692,14 +2692,14 @@
         return cache;
     }
 
-    public GenericDelegator cloneDelegator() {
+    public GenericDelegator cloneDelegator(String delegatorName) {
         // creates an exact clone of the delegator; except for the sequencer
         // note that this will not be cached and should be used only when
         // needed to change something for single instance (use).
         GenericDelegator newDelegator = new GenericDelegator();
         newDelegator.modelReader = this.modelReader;
         newDelegator.modelGroupReader = this.modelGroupReader;
-        newDelegator.delegatorName = this.delegatorName;
+        newDelegator.delegatorName = delegatorName;
         newDelegator.delegatorInfo = this.delegatorInfo;
         newDelegator.cache = this.cache;
         newDelegator.andCacheFieldSets = this.andCacheFieldSets;
@@ -2710,4 +2710,8 @@
 
         return newDelegator;
     }
+
+    public GenericDelegator cloneDelegator() {
+        return this.cloneDelegator(this.delegatorName);
+    }
 }



More information about the Svn mailing list