cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r821316 - in /cayenne/main/trunk/framework: cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ ca...
Date Sat, 03 Oct 2009 13:30:56 GMT
Author: aadamchik
Date: Sat Oct  3 13:30:55 2009
New Revision: 821316

URL: http://svn.apache.org/viewvc?rev=821316&view=rev
Log:
CAY-1281 Lifecycle callbacks reorganization

renaming pre-persist to pre-add, with Modeler upgrade capability

Added:
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/ModelerPreferences.java
      - copied, changed from r821308, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ModelerPreferences.java
Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/LifecycleListener.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/CallbackMap.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/ApplicationUpgradeHandler.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/Project.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextServerDiffsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/CallbackDescriptorTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml
    cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/AbstractCallbackMethodsTab.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/DBGeneratorDefaults.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ComponentGeometry.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBConnectionInfo.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBGeneratorDefaults.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataMapDefaults.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataNodeDefaults.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_FSPath.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/HSQLNode.driver.xml
    cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/ModelerPreferences.map.xml
    cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/Preferences.map.xml
    cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/cayenne.xml

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/LifecycleListener.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/LifecycleListener.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/LifecycleListener.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/LifecycleListener.java Sat Oct  3 13:30:55 2009
@@ -30,7 +30,7 @@
  */
 public interface LifecycleListener {
 
-    void prePersist(Object entity);
+    void preAdd(Object entity);
 
     void postPersist(Object entity);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java Sat Oct  3 13:30:55 2009
@@ -733,7 +733,7 @@
 
         // invoke callbacks
         getEntityResolver().getCallbackRegistry().performCallbacks(
-                LifecycleEvent.PRE_PERSIST,
+                LifecycleEvent.PRE_ADD,
                 object);
 
         return object;
@@ -874,7 +874,7 @@
 
         // invoke callbacks
         getEntityResolver().getCallbackRegistry().performCallbacks(
-                LifecycleEvent.PRE_PERSIST,
+                LifecycleEvent.PRE_ADD,
                 persistent);
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/CallbackMap.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/CallbackMap.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/CallbackMap.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/CallbackMap.java Sat Oct  3 13:30:55 2009
@@ -73,6 +73,10 @@
         return callbacks[LifecycleEvent.POST_UPDATE.ordinal()];
     }
 
+    public CallbackDescriptor getPreAdd() {
+        return callbacks[LifecycleEvent.PRE_ADD.ordinal()];
+    }
+    
     public CallbackDescriptor getPrePersist() {
         return callbacks[LifecycleEvent.PRE_PERSIST.ordinal()];
     }
@@ -86,6 +90,7 @@
     }
 
     public void encodeCallbacksAsXML(XMLEncoder encoder) {
+        printMethods(getPreAdd(), "pre-add", encoder);
         printMethods(getPrePersist(), "pre-persist", encoder);
         printMethods(getPostPersist(), "post-persist", encoder);
         printMethods(getPreUpdate(), "pre-update", encoder);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java Sat Oct  3 13:30:55 2009
@@ -24,5 +24,5 @@
  * @since 3.0
  */
 public enum LifecycleEvent {
-    PRE_PERSIST, PRE_REMOVE, PRE_UPDATE, POST_PERSIST, POST_REMOVE, POST_UPDATE, POST_LOAD;
+    PRE_ADD, PRE_REMOVE, PRE_UPDATE, POST_PERSIST, POST_REMOVE, POST_UPDATE, POST_LOAD, PRE_PERSIST;
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/MapLoader.java Sat Oct  3 13:30:55 2009
@@ -45,9 +45,7 @@
  */
 public class MapLoader extends DefaultHandler {
 
-    // TODO: andrus, 7/17/2006 - these variables, and project upgrade logic should be
-    // refactored out of the MapLoader. In fact we should either modify raw XML during the
-    // upgrade, or implement some consistent upgrade API across various loaders
+    // TODO: andrus, 7/17/2006 - move upgrade logic out of here
     final static String _1_2_PACKAGE_PREFIX = "org.objectstyle.cayenne.";
     final static String _2_0_PACKAGE_PREFIX = "org.apache.cayenne.";
 
@@ -88,6 +86,7 @@
 
     // lifecycle listeners and callbacks related
     public static final String ENTITY_LISTENER_TAG = "entity-listener";
+    public static final String PRE_ADD_TAG = "pre-add";
     public static final String PRE_PERSIST_TAG = "pre-persist";
     public static final String POST_PERSIST_TAG = "post-persist";
     public static final String PRE_UPDATE_TAG = "pre-update";
@@ -139,6 +138,7 @@
     public static final String JAVA_CLASS_ROOT = "java-class";
 
     // Reading from XML
+    private String mapVersion;
     private DataMap dataMap;
     private DbEntity dbEntity;
     private ObjEntity objEntity;
@@ -151,6 +151,7 @@
     private Procedure procedure;
     private QueryLoader queryBuilder;
     private String sqlKey;
+
     private String descending;
     private String ignoreCase;
 
@@ -166,6 +167,14 @@
         startTagOpMap = new HashMap<String, StartClosure>(40);
         endTagOpMap = new HashMap<String, EndClosure>(40);
 
+        startTagOpMap.put(DATA_MAP_TAG, new StartClosure() {
+
+            @Override
+            void execute(Attributes attributes) throws SAXException {
+                processStartDataMap(attributes);
+            }
+        });
+
         startTagOpMap.put(DB_ENTITY_TAG, new StartClosure() {
 
             @Override
@@ -350,6 +359,14 @@
             }
         });
 
+        startTagOpMap.put(PRE_ADD_TAG, new StartClosure() {
+
+            @Override
+            void execute(Attributes attributes) throws SAXException {
+                processStartPreAdd(attributes);
+            }
+        });
+
         startTagOpMap.put(PRE_PERSIST_TAG, new StartClosure() {
 
             @Override
@@ -567,6 +584,10 @@
         });
     }
 
+    private void processStartDataMap(Attributes attributes) {
+        this.mapVersion = attributes.getValue("", "project-version");
+    }
+
     private void processStartEntitylistener(Attributes attributes) {
         entityListener = new EntityListener(attributes.getValue("", "class"));
         if (objEntity != null) {
@@ -583,15 +604,38 @@
         entityListener = null;
     }
 
-    private void processStartPrePersist(Attributes attributes) {
+    private void processStartPreAdd(Attributes attributes) {
         String methodName = attributes.getValue("", "method-name");
         if (entityListener != null) {
             // new "entity-listener" tag as a child of "obj-entity"
-            entityListener.getCallbackMap().getPrePersist().addCallbackMethod(methodName);
+            entityListener.getCallbackMap().getPreAdd().addCallbackMethod(methodName);
         }
         else if (objEntity != null) {
             // new callback tags - children of "obj-entity"
-            objEntity.getCallbackMap().getPrePersist().addCallbackMethod(methodName);
+            objEntity.getCallbackMap().getPreAdd().addCallbackMethod(methodName);
+        }
+    }
+
+    private void processStartPrePersist(Attributes attributes) {
+
+        // 3.0 -> 3.0.0.1 upgrade hack... treat pre-persist as pre-add
+        // only 3.0 used "pre-persist" in a "pre-add" sense
+        if ("3.0".equals(mapVersion)) {
+            processStartPreAdd(attributes);
+        }
+        else {
+
+            String methodName = attributes.getValue("", "method-name");
+
+            if (entityListener != null) {
+                // new "entity-listener" tag as a child of "obj-entity"
+                entityListener.getCallbackMap().getPrePersist().addCallbackMethod(
+                        methodName);
+            }
+            else if (objEntity != null) {
+                // new callback tags - children of "obj-entity"
+                objEntity.getCallbackMap().getPrePersist().addCallbackMethod(methodName);
+            }
         }
     }
 
@@ -1329,6 +1373,7 @@
         }
 
         mapProperties = null;
+        mapVersion = null;
     }
 
     private void processEndObjEntity() {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/ApplicationUpgradeHandler.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/ApplicationUpgradeHandler.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/ApplicationUpgradeHandler.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/ApplicationUpgradeHandler.java Sat Oct  3 13:30:55 2009
@@ -24,15 +24,16 @@
 import org.apache.cayenne.conf.Configuration;
 
 /**
+ * A Cayenne project upgrade handler that relies on individual loaders to be able to read
+ * older versions and convert them to the latest version in memory. This handler simply
+ * checks the version to trigger the update in the calling UI, and saves what's been
+ * already loaded.
+ * 
  * @since 1.1
  */
-// TODO: andrus, 7/16/2006 - upgrade handler is rather primitive and relies on individual
-// loaders to be able to read older versions and convert them to the latest one in memory.
-// So this handler simply checks the version to trigger the update in the calling UI, and
-// saves what's been already loaded.
 abstract class ApplicationUpgradeHandler {
 
-    private static final ApplicationUpgradeHandler sharedInstance = new UpgradeHandler_3_0();
+    private static final ApplicationUpgradeHandler sharedInstance = new UpgradeHandler_3_0_0_1();
 
     static ApplicationUpgradeHandler sharedHandler() {
         return sharedInstance;
@@ -73,6 +74,14 @@
         return Double.parseDouble(buffer.toString());
     }
 
+    static class UpgradeHandler_3_0_0_1 extends UpgradeHandler_3_0 {
+
+        @Override
+        String supportedVersion() {
+            return "3.0.0.1";
+        }
+    }
+
     static class UpgradeHandler_3_0 extends UpgradeHandler_2_0 {
 
         @Override

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/Project.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/Project.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/Project.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/project/Project.java Sat Oct  3 13:30:55 2009
@@ -41,7 +41,7 @@
  */
 public abstract class Project {
 
-    public static final String CURRENT_PROJECT_VERSION = "3.0";
+    public static final String CURRENT_PROJECT_VERSION = "3.0.0.1";
     static final int UPGRADE_STATUS_OLD = -1;
     static final int UPGRADE_STATUS_CURRENT = 0;
     static final int UPGRADE_STATUS_NEW = 1;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry.java Sat Oct  3 13:30:55 2009
@@ -74,7 +74,7 @@
      * methods in this class can be used to register arbitrary listeners.
      */
     public void addDefaultListener(LifecycleListener listener) {
-        addDefaultListener(LifecycleEvent.PRE_PERSIST, listener, "prePersist");
+        addDefaultListener(LifecycleEvent.PRE_ADD, listener, "prePersist");
         addDefaultListener(LifecycleEvent.POST_PERSIST, listener, "postPersist");
         addDefaultListener(LifecycleEvent.PRE_REMOVE, listener, "preRemove");
         addDefaultListener(LifecycleEvent.POST_REMOVE, listener, "postRemove");
@@ -97,7 +97,7 @@
      * methods in this class can be used to register arbitrary listeners.
      */
     public void addListener(Class<?> entityClass, LifecycleListener listener) {
-        addListener(LifecycleEvent.PRE_PERSIST, entityClass, listener, "prePersist");
+        addListener(LifecycleEvent.PRE_ADD, entityClass, listener, "prePersist");
         addListener(LifecycleEvent.POST_PERSIST, entityClass, listener, "postPersist");
         addListener(LifecycleEvent.PRE_REMOVE, entityClass, listener, "preRemove");
         addListener(LifecycleEvent.POST_REMOVE, entityClass, listener, "postRemove");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextServerDiffsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextServerDiffsTest.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextServerDiffsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextServerDiffsTest.java Sat Oct  3 13:30:55 2009
@@ -47,7 +47,7 @@
         try {
 
             registry.addListener(
-                    LifecycleEvent.PRE_PERSIST,
+                    LifecycleEvent.PRE_ADD,
                     MtTable1.class,
                     new ClientChannelServerDiffsListener1(),
                     "prePersist");
@@ -111,7 +111,7 @@
 
         try {
             registry.addListener(
-                    LifecycleEvent.PRE_PERSIST,
+                    LifecycleEvent.PRE_ADD,
                     MtTable1.class,
                     new ClientChannelServerDiffsListener1(),
                     "prePersist");
@@ -141,7 +141,7 @@
 
         try {
             registry.addListener(
-                    LifecycleEvent.PRE_PERSIST,
+                    LifecycleEvent.PRE_ADD,
                     MtTable1.class,
                     new ClientChannelServerDiffsListener1(),
                     "prePersistAddRelationship");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java Sat Oct  3 13:30:55 2009
@@ -187,7 +187,7 @@
                 public void postUpdate(Object entity) {
                 }
 
-                public void prePersist(Object entity) {
+                public void preAdd(Object entity) {
                     flag[0] = true;
                 }
 
@@ -236,7 +236,7 @@
 
         try {
             callbackRegistry.addListener(
-                    LifecycleEvent.PRE_PERSIST,
+                    LifecycleEvent.PRE_ADD,
                     MtTable1.class,
                     "prePersistMethod");
 
@@ -288,7 +288,7 @@
                 public void postUpdate(Object entity) {
                 }
 
-                public void prePersist(Object entity) {
+                public void preAdd(Object entity) {
                 }
 
                 public void preRemove(Object entity) {
@@ -345,7 +345,7 @@
                 public void postUpdate(Object entity) {
                 }
 
-                public void prePersist(Object entity) {
+                public void preAdd(Object entity) {
                 }
 
                 public void preRemove(Object entity) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextCallbacksTest.java Sat Oct  3 13:30:55 2009
@@ -51,7 +51,7 @@
         assertFalse(a1.isPrePersisted());
 
         registry.addListener(
-                LifecycleEvent.PRE_PERSIST,
+                LifecycleEvent.PRE_ADD,
                 Artist.class,
                 "prePersistCallback");
 
@@ -61,7 +61,7 @@
 
         MockCallingBackListener listener2 = new MockCallingBackListener();
         registry.addListener(
-                LifecycleEvent.PRE_PERSIST,
+                LifecycleEvent.PRE_ADD,
                 Artist.class,
                 listener2,
                 "publicCallback");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/CallbackDescriptorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/CallbackDescriptorTest.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/CallbackDescriptorTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/CallbackDescriptorTest.java Sat Oct  3 13:30:55 2009
@@ -28,7 +28,7 @@
     }
 
     public void testAddCallbackMethod() {
-        CallbackDescriptor m = new CallbackDescriptor(LifecycleEvent.PRE_PERSIST);
+        CallbackDescriptor m = new CallbackDescriptor(LifecycleEvent.PRE_ADD);
         assertEquals(0, m.getCallbackMethods().size());
         m.addCallbackMethod("a");
         assertEquals(1, m.getCallbackMethods().size());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsTest.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsTest.java Sat Oct  3 13:30:55 2009
@@ -116,7 +116,7 @@
         try {
 
             registry.addListener(
-                    LifecycleEvent.PRE_PERSIST,
+                    LifecycleEvent.PRE_ADD,
                     MtTable1.class,
                     new ClientChannelServerDiffsListener1(),
                     "prePersist");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne.xml Sat Oct  3 13:30:55 2009
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<domains project-version="3.0">
+<domains project-version="3.0.0.1">
 <domain name="default">
 	<map name="embeddable" location="embeddable.map.xml"/>
 	<map name="generic" location="generic.map.xml"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.embeddable"/>
 	<embeddable className="org.apache.cayenne.testdo.embeddable.Embeddable1">
 		<embeddable-attribute name="embedded10" type="java.lang.String" db-attribute-name="EMBEDDED10"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/generic.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.generic"/>
 	<db-entity name="GENERIC1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.horizontalinherit"/>
 	<db-entity name="INHERITANCE_SUB_ENTITY1">
 		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/locking.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.locking"/>
 	<db-entity name="DATE_LOCKING_TEST">
 		<db-attribute name="DATE_LOCK" type="DATE"/>
@@ -52,7 +52,7 @@
 	<obj-entity name="SoftTest" className="org.apache.cayenne.testdo.locking.SoftTest" dbEntityName="SOFT_TEST">
 		<obj-attribute name="deleted" type="java.lang.Boolean" db-attribute-path="DELETED"/>
 		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-		<pre-persist method-name="onPrePersist"/>
+		<pre-add method-name="onPrePersist"/>
 	</obj-entity>
 	<obj-entity name="TimeLockingTestEntity" className="org.apache.cayenne.testdo.locking.TimeLockingTestEntity" lock-type="optimistic" dbEntityName="TIME_LOCKING_TEST">
 		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db1.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.db1"/>
 	<db-entity name="CROSSDB_M1E1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/map-db2.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.db2"/>
 	<db-entity name="CROSSDB_M2E1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.mt"/>
 	<property name="clientSupported" value="true"/>
 	<property name="defaultClientPackage" value="org.apache.cayenne.testdo.mt"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/people.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.inherit"/>
 	<db-entity name="ADDRESS">
 		<db-attribute name="ADDRESS_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.qualified"/>
 	<db-entity name="QUALIFIED1">
 		<db-attribute name="DELETED" type="BOOLEAN"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.quotemap"/>
 	<property name="quoteSqlIdentifiers" value="true"/>
 	<db-entity name="QUOTE_ADRESS">

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/relationships.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.relationship"/>
 	<db-entity name="CLOB_DETAIL">
 		<db-attribute name="CLOB_DETAIL_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<db-entity name="SUS1">
 		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 		<db-attribute name="strNoMandatory" type="VARCHAR" length="200"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml Sat Oct  3 13:30:55 2009
@@ -2,7 +2,7 @@
 <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-  project-version="3.0">
+  project-version="3.0.0.1">
 	<property name="defaultPackage" value="org.apache.art"/>
 	<property name="defaultSuperclass" value="org.apache.cayenne.CayenneDataObject"/>
 	<property name="clientSupported" value="true"/>
@@ -255,7 +255,7 @@
 		<obj-attribute name="artistName" type="java.lang.String"/>
 		<obj-attribute name="dateOfBirth" type="java.util.Date"/>
 		<entity-listener class="org.apache.art.EntityListenerObjEntity">
-			<pre-persist method-name="prePersistEntityListener"/>
+			<pre-add method-name="prePersistEntityListener"/>
 			<post-persist method-name="postPersistEntityListener"/>
 			<pre-update method-name="preUpdateEntityListener"/>
 			<post-update method-name="postUpdateEntityListener"/>
@@ -263,7 +263,7 @@
 			<post-remove method-name="postRemoveEntityListener"/>
 			<post-load method-name="postLoadEntityListener"/>
 		</entity-listener>
-		<pre-persist method-name="prePersistEntityObjEntity"/>
+		<pre-add method-name="prePersistEntityObjEntity"/>
 		<post-persist method-name="postPersistEntityObjEntity"/>
 		<pre-update method-name="preUpdateEntityObjEntity"/>
 		<post-update method-name="postUpdateEntityObjEntity"/>
@@ -644,8 +644,8 @@
 		<sql><![CDATA[select * from ARTIST]]></sql>
 	</query>
 	<entity-listener class="org.apache.art.EntityListenerDataMap">
-		<pre-persist method-name="prePersistDataMap1"/>
-		<pre-persist method-name="prePersistDataMap2"/>
+		<pre-add method-name="prePersistDataMap1"/>
+		<pre-add method-name="prePersistDataMap2"/>
 		<post-persist method-name="postPersistDataMap"/>
 		<pre-update method-name="preUpdateDataMap"/>
 		<post-update method-name="postUpdateDataMap"/>

Modified: cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jpa-unpublished/src/main/java/org/apache/cayenne/jpa/bridge/DataMapConverter.java Sat Oct  3 13:30:55 2009
@@ -244,7 +244,7 @@
         }
 
         if (jpaListener.getPrePersist() != null) {
-            listener.getCallbackMap().getPrePersist().addCallbackMethod(
+            listener.getCallbackMap().getPreAdd().addCallbackMethod(
                     jpaListener.getPrePersist().getMethodName());
         }
 
@@ -763,7 +763,7 @@
             }
 
             if (jpaEntity.getPrePersist() != null) {
-                cayenneEntity.getCallbackMap().getPrePersist().addCallbackMethod(
+                cayenneEntity.getCallbackMap().getPreAdd().addCallbackMethod(
                         jpaEntity.getPrePersist().getMethodName());
             }
 

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/OpenProjectAction.java Sat Oct  3 13:30:55 2009
@@ -165,7 +165,9 @@
 
         // perform upgrade
         logObj.info("Will upgrade project " + project.getMainFile());
+        getProjectController().getProjectWatcher().pauseWatching();
         project.upgrade();
+        getProjectController().getProjectWatcher().reconfigure();
         return true;
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/AbstractCallbackMethodsTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/AbstractCallbackMethodsTab.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/AbstractCallbackMethodsTab.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/AbstractCallbackMethodsTab.java Sat Oct  3 13:30:55 2009
@@ -85,7 +85,7 @@
      */
     protected JComboBox callbackTypeCombo = CayenneWidgetFactory.createComboBox(
             new Object[] {
-                    new CallbackType(LifecycleEvent.PRE_PERSIST, "pre-persist"),
+                    new CallbackType(LifecycleEvent.PRE_ADD, "pre-add"),
                     new CallbackType(LifecycleEvent.POST_PERSIST, "post-persist"),
                     new CallbackType(LifecycleEvent.PRE_UPDATE, "pre-update"),
                     new CallbackType(LifecycleEvent.POST_UPDATE, "post-update"),

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/DBGeneratorDefaults.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/DBGeneratorDefaults.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/DBGeneratorDefaults.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/DBGeneratorDefaults.java Sat Oct  3 13:30:55 2009
@@ -38,6 +38,7 @@
     /**
      * An initialization callback.
      */
+    @Override
     public void prePersist() {
         setCreateFK(Boolean.TRUE);
         setCreatePK(Boolean.TRUE);

Copied: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/ModelerPreferences.java (from r821308, cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/ModelerPreferences.java?p2=cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/ModelerPreferences.java&p1=cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java&r1=821308&r2=821316&rev=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/LifecycleEvent.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/ModelerPreferences.java Sat Oct  3 13:30:55 2009
@@ -16,13 +16,20 @@
  *  specific language governing permissions and limitations
  *  under the License.
  ****************************************************************/
-package org.apache.cayenne.map;
+package org.apache.cayenne.modeler.pref;
 
-/**
- * Defines possible object lifecycle events for which callbacks are supported.
- * 
- * @since 3.0
- */
-public enum LifecycleEvent {
-    PRE_PERSIST, PRE_REMOVE, PRE_UPDATE, POST_PERSIST, POST_REMOVE, POST_UPDATE, POST_LOAD;
+public class ModelerPreferences extends _ModelerPreferences {
+
+    private static ModelerPreferences instance;
+
+    private ModelerPreferences() {
+    }
+
+    public static ModelerPreferences getInstance() {
+        if (instance == null) {
+            instance = new ModelerPreferences();
+        }
+
+        return instance;
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ComponentGeometry.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ComponentGeometry.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ComponentGeometry.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ComponentGeometry.java Sat Oct  3 13:30:55 2009
@@ -1,11 +1,14 @@
 package org.apache.cayenne.modeler.pref;
 
-/** Class _ComponentGeometry was generated by Cayenne.
-  * It is probably a good idea to avoid changing this class manually, 
-  * since it may be overwritten next time code is regenerated. 
-  * If you need to make any customizations, please use subclass. 
-  */
-public class _ComponentGeometry extends org.apache.cayenne.pref.PreferenceDetail {
+import org.apache.cayenne.pref.PreferenceDetail;
+
+/**
+ * Class _ComponentGeometry was generated by Cayenne.
+ * It is probably a good idea to avoid changing this class manually,
+ * since it may be overwritten next time code is regenerated.
+ * If you need to make any customizations, please use subclass.
+ */
+public abstract class _ComponentGeometry extends PreferenceDetail {
 
     public static final String HEIGHT_PROPERTY = "height";
     public static final String WIDTH_PROPERTY = "width";
@@ -20,30 +23,26 @@
     public Integer getHeight() {
         return (Integer)readProperty("height");
     }
-    
-    
+
     public void setWidth(Integer width) {
         writeProperty("width", width);
     }
     public Integer getWidth() {
         return (Integer)readProperty("width");
     }
-    
-    
+
     public void setX(Integer x) {
         writeProperty("x", x);
     }
     public Integer getX() {
         return (Integer)readProperty("x");
     }
-    
-    
+
     public void setY(Integer y) {
         writeProperty("y", y);
     }
     public Integer getY() {
         return (Integer)readProperty("y");
     }
-    
-    
+
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBConnectionInfo.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBConnectionInfo.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBConnectionInfo.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBConnectionInfo.java Sat Oct  3 13:30:55 2009
@@ -1,11 +1,14 @@
 package org.apache.cayenne.modeler.pref;
 
-/** Class _DBConnectionInfo was generated by Cayenne.
-  * It is probably a good idea to avoid changing this class manually, 
-  * since it may be overwritten next time code is regenerated. 
-  * If you need to make any customizations, please use subclass. 
-  */
-public class _DBConnectionInfo extends org.apache.cayenne.pref.PreferenceDetail {
+import org.apache.cayenne.pref.PreferenceDetail;
+
+/**
+ * Class _DBConnectionInfo was generated by Cayenne.
+ * It is probably a good idea to avoid changing this class manually,
+ * since it may be overwritten next time code is regenerated.
+ * If you need to make any customizations, please use subclass.
+ */
+public abstract class _DBConnectionInfo extends PreferenceDetail {
 
     public static final String DB_ADAPTER_PROPERTY = "dbAdapter";
     public static final String DOMAIN_PREFERENCE_ID_PROPERTY = "domainPreferenceId";
@@ -22,46 +25,40 @@
     public String getDbAdapter() {
         return (String)readProperty("dbAdapter");
     }
-    
-    
+
     public void setDomainPreferenceId(Integer domainPreferenceId) {
         writeProperty("domainPreferenceId", domainPreferenceId);
     }
     public Integer getDomainPreferenceId() {
         return (Integer)readProperty("domainPreferenceId");
     }
-    
-    
+
     public void setJdbcDriver(String jdbcDriver) {
         writeProperty("jdbcDriver", jdbcDriver);
     }
     public String getJdbcDriver() {
         return (String)readProperty("jdbcDriver");
     }
-    
-    
+
     public void setPassword(String password) {
         writeProperty("password", password);
     }
     public String getPassword() {
         return (String)readProperty("password");
     }
-    
-    
+
     public void setUrl(String url) {
         writeProperty("url", url);
     }
     public String getUrl() {
         return (String)readProperty("url");
     }
-    
-    
+
     public void setUserName(String userName) {
         writeProperty("userName", userName);
     }
     public String getUserName() {
         return (String)readProperty("userName");
     }
-    
-    
+
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBGeneratorDefaults.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBGeneratorDefaults.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBGeneratorDefaults.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DBGeneratorDefaults.java Sat Oct  3 13:30:55 2009
@@ -1,11 +1,14 @@
 package org.apache.cayenne.modeler.pref;
 
-/** Class _DBGeneratorDefaults was generated by Cayenne.
-  * It is probably a good idea to avoid changing this class manually, 
-  * since it may be overwritten next time code is regenerated. 
-  * If you need to make any customizations, please use subclass. 
-  */
-public class _DBGeneratorDefaults extends org.apache.cayenne.pref.PreferenceDetail {
+import org.apache.cayenne.pref.PreferenceDetail;
+
+/**
+ * Class _DBGeneratorDefaults was generated by Cayenne.
+ * It is probably a good idea to avoid changing this class manually,
+ * since it may be overwritten next time code is regenerated.
+ * If you need to make any customizations, please use subclass.
+ */
+public abstract class _DBGeneratorDefaults extends PreferenceDetail {
 
     public static final String CREATE_FK_PROPERTY = "createFK";
     public static final String CREATE_PK_PROPERTY = "createPK";
@@ -21,38 +24,35 @@
     public Boolean getCreateFK() {
         return (Boolean)readProperty("createFK");
     }
-    
-    
+
     public void setCreatePK(Boolean createPK) {
         writeProperty("createPK", createPK);
     }
     public Boolean getCreatePK() {
         return (Boolean)readProperty("createPK");
     }
-    
-    
+
     public void setCreateTables(Boolean createTables) {
         writeProperty("createTables", createTables);
     }
     public Boolean getCreateTables() {
         return (Boolean)readProperty("createTables");
     }
-    
-    
+
     public void setDropPK(Boolean dropPK) {
         writeProperty("dropPK", dropPK);
     }
     public Boolean getDropPK() {
         return (Boolean)readProperty("dropPK");
     }
-    
-    
+
     public void setDropTables(Boolean dropTables) {
         writeProperty("dropTables", dropTables);
     }
     public Boolean getDropTables() {
         return (Boolean)readProperty("dropTables");
     }
-    
-    
+
+    protected abstract void prePersist();
+
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataMapDefaults.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataMapDefaults.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataMapDefaults.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataMapDefaults.java Sat Oct  3 13:30:55 2009
@@ -1,11 +1,14 @@
 package org.apache.cayenne.modeler.pref;
 
-/** Class _DataMapDefaults was generated by Cayenne.
-  * It is probably a good idea to avoid changing this class manually, 
-  * since it may be overwritten next time code is regenerated. 
-  * If you need to make any customizations, please use subclass. 
-  */
-public class _DataMapDefaults extends org.apache.cayenne.pref.PreferenceDetail {
+import org.apache.cayenne.pref.PreferenceDetail;
+
+/**
+ * Class _DataMapDefaults was generated by Cayenne.
+ * It is probably a good idea to avoid changing this class manually,
+ * since it may be overwritten next time code is regenerated.
+ * If you need to make any customizations, please use subclass.
+ */
+public abstract class _DataMapDefaults extends PreferenceDetail {
 
     public static final String GENERATE_PAIRS_PROPERTY = "generatePairs";
     public static final String OUTPUT_PATH_PROPERTY = "outputPath";
@@ -21,38 +24,35 @@
     public Boolean getGeneratePairs() {
         return (Boolean)readProperty("generatePairs");
     }
-    
-    
+
     public void setOutputPath(String outputPath) {
         writeProperty("outputPath", outputPath);
     }
     public String getOutputPath() {
         return (String)readProperty("outputPath");
     }
-    
-    
+
     public void setSubclassTemplate(String subclassTemplate) {
         writeProperty("subclassTemplate", subclassTemplate);
     }
     public String getSubclassTemplate() {
         return (String)readProperty("subclassTemplate");
     }
-    
-    
+
     public void setSuperclassPackage(String superclassPackage) {
         writeProperty("superclassPackage", superclassPackage);
     }
     public String getSuperclassPackage() {
         return (String)readProperty("superclassPackage");
     }
-    
-    
+
     public void setSuperclassTemplate(String superclassTemplate) {
         writeProperty("superclassTemplate", superclassTemplate);
     }
     public String getSuperclassTemplate() {
         return (String)readProperty("superclassTemplate");
     }
-    
-    
+
+    protected abstract void prePersist();
+
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataNodeDefaults.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataNodeDefaults.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataNodeDefaults.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_DataNodeDefaults.java Sat Oct  3 13:30:55 2009
@@ -1,11 +1,14 @@
 package org.apache.cayenne.modeler.pref;
 
-/** Class _DataNodeDefaults was generated by Cayenne.
-  * It is probably a good idea to avoid changing this class manually, 
-  * since it may be overwritten next time code is regenerated. 
-  * If you need to make any customizations, please use subclass. 
-  */
-public class _DataNodeDefaults extends org.apache.cayenne.pref.PreferenceDetail {
+import org.apache.cayenne.pref.PreferenceDetail;
+
+/**
+ * Class _DataNodeDefaults was generated by Cayenne.
+ * It is probably a good idea to avoid changing this class manually,
+ * since it may be overwritten next time code is regenerated.
+ * If you need to make any customizations, please use subclass.
+ */
+public abstract class _DataNodeDefaults extends PreferenceDetail {
 
     public static final String LOCAL_DATA_SOURCE_PROPERTY = "localDataSource";
 
@@ -17,6 +20,5 @@
     public String getLocalDataSource() {
         return (String)readProperty("localDataSource");
     }
-    
-    
+
 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_FSPath.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_FSPath.java?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_FSPath.java (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_FSPath.java Sat Oct  3 13:30:55 2009
@@ -1,11 +1,14 @@
 package org.apache.cayenne.modeler.pref;
 
-/** Class _FSPath was generated by Cayenne.
-  * It is probably a good idea to avoid changing this class manually, 
-  * since it may be overwritten next time code is regenerated. 
-  * If you need to make any customizations, please use subclass. 
-  */
-public class _FSPath extends org.apache.cayenne.pref.PreferenceDetail {
+import org.apache.cayenne.pref.PreferenceDetail;
+
+/**
+ * Class _FSPath was generated by Cayenne.
+ * It is probably a good idea to avoid changing this class manually,
+ * since it may be overwritten next time code is regenerated.
+ * If you need to make any customizations, please use subclass.
+ */
+public abstract class _FSPath extends PreferenceDetail {
 
     public static final String PATH_PROPERTY = "path";
 
@@ -17,6 +20,5 @@
     public String getPath() {
         return (String)readProperty("path");
     }
-    
-    
+
 }

Added: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ModelerPreferences.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ModelerPreferences.java?rev=821316&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ModelerPreferences.java (added)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/pref/_ModelerPreferences.java Sat Oct  3 13:30:55 2009
@@ -0,0 +1,12 @@
+package org.apache.cayenne.modeler.pref;
+
+
+
+/**
+ * This class was generated by Cayenne.
+ * It is probably a good idea to avoid changing this class manually,
+ * since it may be overwritten next time code is regenerated.
+ * If you need to make any customizations, please use subclass.
+ */
+public class _ModelerPreferences {
+}
\ No newline at end of file

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/HSQLNode.driver.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/HSQLNode.driver.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/HSQLNode.driver.xml (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/HSQLNode.driver.xml Sat Oct  3 13:30:55 2009
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<driver project-version="3.0" class="org.hsqldb.jdbcDriver">
+<driver project-version="3.0.0.1" class="org.hsqldb.jdbcDriver">
 	<connectionPool min="1" max="1"/>
 	<login userName="sa"/>
 </driver>

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/ModelerPreferences.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/ModelerPreferences.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/ModelerPreferences.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/ModelerPreferences.map.xml Sat Oct  3 13:30:55 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+  project-version="3.0.0.1">
 	<property name="defaultLockType" value="optimistic"/>
 	<property name="defaultPackage" value="org.apache.cayenne.modeler.pref"/>
 	<property name="defaultSuperclass" value="org.apache.cayenne.pref.PreferenceDetail"/>
@@ -63,7 +66,7 @@
 		<obj-attribute name="createTables" type="java.lang.Boolean" db-attribute-path="create_tables"/>
 		<obj-attribute name="dropPK" type="java.lang.Boolean" db-attribute-path="drop_pk"/>
 		<obj-attribute name="dropTables" type="java.lang.Boolean" db-attribute-path="drop_tables"/>
-		<pre-persist method-name="prePersist"/>
+		<pre-add method-name="prePersist"/>
 	</obj-entity>
 	<obj-entity name="DataMapDefaults" className="org.apache.cayenne.modeler.pref.DataMapDefaults" lock-type="optimistic" dbEntityName="data_map_defaults" superClassName="org.apache.cayenne.pref.PreferenceDetail">
 		<obj-attribute name="generatePairs" type="java.lang.Boolean" db-attribute-path="generate_pairs"/>
@@ -71,7 +74,7 @@
 		<obj-attribute name="subclassTemplate" type="java.lang.String" db-attribute-path="subclass_template"/>
 		<obj-attribute name="superclassPackage" type="java.lang.String" db-attribute-path="superclass_package_suffix"/>
 		<obj-attribute name="superclassTemplate" type="java.lang.String" db-attribute-path="superclass_template"/>
-		<pre-persist method-name="prePersist"/>
+		<pre-add method-name="prePersist"/>
 	</obj-entity>
 	<obj-entity name="DataNodeDefaults" className="org.apache.cayenne.modeler.pref.DataNodeDefaults" lock-type="optimistic" dbEntityName="data_node_defaults" superClassName="org.apache.cayenne.pref.PreferenceDetail">
 		<obj-attribute name="localDataSource" type="java.lang.String" db-attribute-path="local_data_source"/>

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/Preferences.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/Preferences.map.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/Preferences.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/Preferences.map.xml Sat Oct  3 13:30:55 2009
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="3.0">
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+  project-version="3.0.0.1">
 	<property name="defaultLockType" value="optimistic"/>
 	<property name="defaultPackage" value="org.apache.cayenne.pref"/>
 	<db-entity name="domain">

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/cayenne.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/cayenne.xml?rev=821316&r1=821315&r2=821316&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/cayenne.xml (original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/resources/pref/cayenne.xml Sat Oct  3 13:30:55 2009
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<domains project-version="3.0">
+<domains project-version="3.0.0.1">
 <domain name="CayenneModelerPreferences">
 	<property name="cayenne.DataRowStore.snapshot.size" value="1000"/>
 



Mime
View raw message