Salome HOME
The draft of the "Copy from existing study" action is added. The YACS step is introdu...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / kernel / Persistent.java
index 1f95b0dd4aa0e99914f3b959a4657c4f62c66b27..b710fb0a8756856c8d2bf990a1e2366af5b43078 100644 (file)
@@ -46,7 +46,10 @@ public abstract class Persistent {
        private String _uid = IdGenerator.createId();
 
        protected abstract static class Properties implements ObjectProperties {
-               private long rid; // Primary key of persistent objects
+               /**
+                * Primary key of the persistent objects.
+                */
+               private long rid;
 
                private boolean tobechecked = true; // Property validity check flag
 
@@ -109,6 +112,15 @@ public abstract class Persistent {
        // Public member functions
        // ==============================================================================================================================
 
+       /**
+        * Generate new GUID for this object. Must be called when this object is <BR>
+        * intended to be copied as another new persistent object. 
+        */
+       public void evict() {
+               _uid = IdGenerator.createId();
+               rid = 0;
+       }
+
        /**
         * Persistent objects are equal if their UIDs are equal.<BR>
         * {@inheritDoc}