cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [28/50] [abbrv] cayenne git commit: Refactor Locking Project
Date Fri, 14 Nov 2014 17:47:29 GMT
Refactor Locking Project


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/4baf598d
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/4baf598d
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/4baf598d

Branch: refs/heads/CAY-1946
Commit: 4baf598da2b258ef4f788b15f9b324680a874596
Parents: 4d8b2e1
Author: Savva Kolbechev <s.kolbachev@gmail.com>
Authored: Mon Nov 10 13:49:38 2014 +0300
Committer: Savva Kolbechev <s.kolbachev@gmail.com>
Committed: Mon Nov 10 13:49:38 2014 +0300

----------------------------------------------------------------------
 .../batch/SoftDeleteBatchTranslatorIT.java      |  4 +--
 .../testdo/locking/DateLockingTestEntity.java   | 28 ----------------
 .../cayenne/testdo/locking/SoftDelete.java      | 30 -----------------
 .../testdo/locking/TimeLockingTestEntity.java   | 28 ----------------
 .../locking/auto/_DateLockingTestEntity.java    | 34 --------------------
 .../testdo/locking/auto/_SoftDelete.java        | 34 --------------------
 .../locking/auto/_TimeLockingTestEntity.java    | 34 --------------------
 .../cayenne/testdo/soft_delete/SoftDelete.java  | 30 +++++++++++++++++
 .../testdo/soft_delete/auto/_SoftDelete.java    | 34 ++++++++++++++++++++
 .../cayenne/unit/di/server/SchemaBuilder.java   |  2 +-
 .../cayenne/unit/di/server/ServerCase.java      |  1 +
 .../src/test/resources/cayenne-soft-delete.xml  |  4 +++
 .../src/test/resources/locking.map.xml          | 29 -----------------
 .../src/test/resources/soft-delete.map.xml      | 18 +++++++++++
 14 files changed, 90 insertions(+), 220 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
index dee5340..de14c36 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
@@ -32,7 +32,7 @@ import org.apache.cayenne.query.DeleteBatchQuery;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.parallel.ParallelTestContainer;
-import org.apache.cayenne.testdo.locking.SoftDelete;
+import org.apache.cayenne.testdo.soft_delete.SoftDelete;
 import org.apache.cayenne.unit.UnitDbAdapter;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
@@ -46,7 +46,7 @@ import java.util.List;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ServerCase.LOCKING_PROJECT)
+@UseServerRuntime(ServerCase.SOFT_DELETE_PROJECT)
 public class SoftDeleteBatchTranslatorIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/DateLockingTestEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/DateLockingTestEntity.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/DateLockingTestEntity.java
deleted file mode 100644
index 6fe5464..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/DateLockingTestEntity.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.testdo.locking;
-
-import org.apache.cayenne.testdo.locking.auto._DateLockingTestEntity;
-
-public class DateLockingTestEntity extends _DateLockingTestEntity {
-
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/SoftDelete.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/SoftDelete.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/SoftDelete.java
deleted file mode 100644
index f1a0262..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/SoftDelete.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.testdo.locking;
-
-import org.apache.cayenne.testdo.locking.auto._SoftDelete;
-
-public class SoftDelete extends _SoftDelete {
-
-    @Override
-    protected void onPrePersist() {
-        setDeleted(false);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/TimeLockingTestEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/TimeLockingTestEntity.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/TimeLockingTestEntity.java
deleted file mode 100644
index 53f0f51..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/TimeLockingTestEntity.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.testdo.locking;
-
-import org.apache.cayenne.testdo.locking.auto._TimeLockingTestEntity;
-
-public class TimeLockingTestEntity extends _TimeLockingTestEntity {
-
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_DateLockingTestEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_DateLockingTestEntity.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_DateLockingTestEntity.java
deleted file mode 100644
index 692c7d7..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_DateLockingTestEntity.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.cayenne.testdo.locking.auto;
-
-import java.util.Date;
-
-import org.apache.cayenne.CayenneDataObject;
-
-/**
- * Class _DateLockingTestEntity 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 _DateLockingTestEntity extends CayenneDataObject {
-
-    public static final String DATE_LOCK_PROPERTY = "dateLock";
-    public static final String NAME_PROPERTY = "name";
-
-    public static final String DATE_LOCKING_TEST_ID_PK_COLUMN = "DATE_LOCKING_TEST_ID";
-
-    public void setDateLock(Date dateLock) {
-        writeProperty(DATE_LOCK_PROPERTY, dateLock);
-    }
-    public Date getDateLock() {
-        return (Date)readProperty(DATE_LOCK_PROPERTY);
-    }
-
-    public void setName(String name) {
-        writeProperty(NAME_PROPERTY, name);
-    }
-    public String getName() {
-        return (String)readProperty(NAME_PROPERTY);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_SoftDelete.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_SoftDelete.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_SoftDelete.java
deleted file mode 100644
index 2b3d7b1..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_SoftDelete.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.cayenne.testdo.locking.auto;
-
-import org.apache.cayenne.CayenneDataObject;
-
-/**
- * Class _SoftTest 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 _SoftDelete extends CayenneDataObject {
-
-    public static final String DELETED_PROPERTY = "deleted";
-    public static final String NAME_PROPERTY = "name";
-
-    public static final String ID_PK_COLUMN = "ID";
-
-    public void setDeleted(Boolean deleted) {
-        writeProperty(DELETED_PROPERTY, deleted);
-    }
-    public Boolean getDeleted() {
-        return (Boolean)readProperty(DELETED_PROPERTY);
-    }
-
-    public void setName(String name) {
-        writeProperty(NAME_PROPERTY, name);
-    }
-    public String getName() {
-        return (String)readProperty(NAME_PROPERTY);
-    }
-
-    protected abstract void onPrePersist();
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_TimeLockingTestEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_TimeLockingTestEntity.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_TimeLockingTestEntity.java
deleted file mode 100644
index 0f658d3..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/testdo/locking/auto/_TimeLockingTestEntity.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.cayenne.testdo.locking.auto;
-
-import java.util.Date;
-
-import org.apache.cayenne.CayenneDataObject;
-
-/**
- * Class _TimeLockingTestEntity 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 _TimeLockingTestEntity extends CayenneDataObject {
-
-    public static final String NAME_PROPERTY = "name";
-    public static final String TIME_LOCK_PROPERTY = "timeLock";
-
-    public static final String TIME_LOCKING_TEST_ID_PK_COLUMN = "TIME_LOCKING_TEST_ID";
-
-    public void setName(String name) {
-        writeProperty(NAME_PROPERTY, name);
-    }
-    public String getName() {
-        return (String)readProperty(NAME_PROPERTY);
-    }
-
-    public void setTimeLock(Date timeLock) {
-        writeProperty(TIME_LOCK_PROPERTY, timeLock);
-    }
-    public Date getTimeLock() {
-        return (Date)readProperty(TIME_LOCK_PROPERTY);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/SoftDelete.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/SoftDelete.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/SoftDelete.java
new file mode 100644
index 0000000..d55ff28
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/SoftDelete.java
@@ -0,0 +1,30 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.testdo.soft_delete;
+
+import org.apache.cayenne.testdo.soft_delete.auto._SoftDelete;
+
+public class SoftDelete extends _SoftDelete {
+
+    @Override
+    protected void onPrePersist() {
+        setDeleted(false);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
b/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
new file mode 100644
index 0000000..363490f
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/testdo/soft_delete/auto/_SoftDelete.java
@@ -0,0 +1,34 @@
+package org.apache.cayenne.testdo.soft_delete.auto;
+
+import org.apache.cayenne.CayenneDataObject;
+
+/**
+ * Class _SoftTest 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 _SoftDelete extends CayenneDataObject {
+
+    public static final String DELETED_PROPERTY = "deleted";
+    public static final String NAME_PROPERTY = "name";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void setDeleted(Boolean deleted) {
+        writeProperty(DELETED_PROPERTY, deleted);
+    }
+    public Boolean getDeleted() {
+        return (Boolean)readProperty(DELETED_PROPERTY);
+    }
+
+    public void setName(String name) {
+        writeProperty(NAME_PROPERTY, name);
+    }
+    public String getName() {
+        return (String)readProperty(NAME_PROPERTY);
+    }
+
+    protected abstract void onPrePersist();
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
index c598a8f..1c20b72 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
@@ -69,7 +69,7 @@ public class SchemaBuilder {
     public static final String SKIP_SCHEMA_KEY = "cayenne.test.schema.skip";
 
     private static String[] MAPS_REQUIRING_SCHEMA_SETUP = { "tstmap.map.xml", "people.map.xml",
-            "locking.map.xml", "relationships.map.xml", "relationships1.map.xml", "multi-tier.map.xml",
+            "locking.map.xml", "soft-delete.map.xml", "relationships.map.xml", "relationships1.map.xml",
"multi-tier.map.xml",
             "persistent.map.xml", "reflexive.map.xml", "delete-rules.map.xml", "lifecycles.map.xml",
             "map-to-many.map.xml", "toone.map.xml", "meaningful-pk.map.xml", "table-primitives.map.xml",
             "generic.map.xml", "map-db1.map.xml", "map-db2.map.xml", "embeddable.map.xml",
"qualified.map.xml",

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCase.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCase.java
b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCase.java
index 0ec0980..9e2f648 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCase.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCase.java
@@ -33,6 +33,7 @@ public class ServerCase extends DICase {
 	public static final String INHERTITANCE_SINGLE_TABLE1_PROJECT = "cayenne-inheritance-single-table1.xml";
 	public static final String INHERTITANCE_VERTICAL_PROJECT = "cayenne-inheritance-vertical.xml";
 	public static final String LOCKING_PROJECT = "cayenne-locking.xml";
+	public static final String SOFT_DELETE_PROJECT = "cayenne-soft-delete.xml";
 	public static final String QUOTED_IDENTIFIERS_PROJECT = "cayenne-quoted-identifiers.xml";
 	public static final String PEOPLE_PROJECT = "cayenne-people.xml";
 	public static final String RELATIONSHIPS_PROJECT = "cayenne-relationships.xml";

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/resources/cayenne-soft-delete.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/cayenne-soft-delete.xml b/cayenne-server/src/test/resources/cayenne-soft-delete.xml
new file mode 100644
index 0000000..15dfc25
--- /dev/null
+++ b/cayenne-server/src/test/resources/cayenne-soft-delete.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domain project-version="7">
+    <map name="soft-delete"/>
+</domain>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/resources/locking.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/locking.map.xml b/cayenne-server/src/test/resources/locking.map.xml
index 23067e3..6bc80f1 100644
--- a/cayenne-server/src/test/resources/locking.map.xml
+++ b/cayenne-server/src/test/resources/locking.map.xml
@@ -4,11 +4,6 @@
 	 xsi:schemaLocation="http://cayenne.apache.org/schema/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
 	 project-version="7">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.locking"/>
-	<db-entity name="DATE_LOCKING_TEST">
-		<db-attribute name="DATE_LOCK" type="DATE"/>
-		<db-attribute name="DATE_LOCKING_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="NAME" type="VARCHAR" length="100"/>
-	</db-entity>
 	<db-entity name="LOCKING_HELPER">
 		<db-attribute name="LOCKING_HELPER_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 		<db-attribute name="NAME" type="VARCHAR" length="100"/>
@@ -24,21 +19,6 @@
 		<db-attribute name="LOCKING_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 		<db-attribute name="NAME" type="VARCHAR" length="100"/>
 	</db-entity>
-	<db-entity name="SOFT_DELETE">
-		<db-attribute name="DELETED" type="BOOLEAN"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="NAME" type="VARCHAR" length="100"/>
-		<qualifier><![CDATA[DELETED = false]]></qualifier>
-	</db-entity>
-	<db-entity name="TIME_LOCKING_TEST">
-		<db-attribute name="NAME" type="VARCHAR" length="100"/>
-		<db-attribute name="TIME_LOCK" type="TIMESTAMP"/>
-		<db-attribute name="TIME_LOCKING_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<obj-entity name="DateLockingTestEntity" className="org.apache.cayenne.testdo.locking.DateLockingTestEntity"
lock-type="optimistic" dbEntityName="DATE_LOCKING_TEST">
-		<obj-attribute name="dateLock" type="java.util.Date" lock="true" db-attribute-path="DATE_LOCK"/>
-		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-	</obj-entity>
 	<obj-entity name="LockingHelper" className="org.apache.cayenne.testdo.locking.LockingHelper"
dbEntityName="LOCKING_HELPER">
 		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
 	</obj-entity>
@@ -49,15 +29,6 @@
 		<obj-attribute name="description" type="java.lang.String" db-attribute-path="DESCRIPTION"/>
 		<obj-attribute name="name" type="java.lang.String" lock="true" db-attribute-path="NAME"/>
 	</obj-entity>
-	<obj-entity name="SoftDelete" className="org.apache.cayenne.testdo.locking.SoftDelete"
dbEntityName="SOFT_DELETE">
-		<obj-attribute name="deleted" type="java.lang.Boolean" db-attribute-path="DELETED"/>
-		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-		<post-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"/>
-		<obj-attribute name="timeLock" type="java.util.Date" lock="true" db-attribute-path="TIME_LOCK"/>
-	</obj-entity>
 	<db-relationship name="toRelLockingTest" source="LOCKING_HELPER" target="REL_LOCKING_TEST"
toMany="false">
 		<db-attribute-pair source="REL_LOCKING_TEST_ID" target="REL_LOCKING_TEST_ID"/>
 	</db-relationship>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/4baf598d/cayenne-server/src/test/resources/soft-delete.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/resources/soft-delete.map.xml b/cayenne-server/src/test/resources/soft-delete.map.xml
new file mode 100644
index 0000000..52efe07
--- /dev/null
+++ b/cayenne-server/src/test/resources/soft-delete.map.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/7/modelMap"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://cayenne.apache.org/schema/7/modelMap http://cayenne.apache.org/schema/7/modelMap.xsd"
+          project-version="7">
+    <property name="defaultPackage" value="org.apache.cayenne.testdo.soft_delete"/>
+    <db-entity name="SOFT_DELETE">
+        <db-attribute name="DELETED" type="BOOLEAN"/>
+        <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+        <db-attribute name="NAME" type="VARCHAR" length="100"/>
+        <qualifier><![CDATA[DELETED = false]]></qualifier>
+    </db-entity>
+    <obj-entity name="SoftDelete" className="org.apache.cayenne.testdo.soft_delete.SoftDelete"
dbEntityName="SOFT_DELETE">
+        <obj-attribute name="deleted" type="java.lang.Boolean" db-attribute-path="DELETED"/>
+        <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+        <post-add method-name="onPrePersist"/>
+    </obj-entity>
+</data-map>
\ No newline at end of file


Mime
View raw message