incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1362378 - in /incubator/isis/trunk/framework: core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/objecttype/ progmodels/dflt/src/m...
Date Tue, 17 Jul 2012 07:02:18 GMT
Author: danhaywood
Date: Tue Jul 17 07:02:16 2012
New Revision: 1362378

URL: http://svn.apache.org/viewvc?rev=1362378&view=rev
Log:
ISIS-14: refactoring TCK dom repositories, starting on tests for parent/child

Added:
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectSpecIdAnnotationFacetFactory.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactory.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/refs/
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/refs/Persistence_persist_parent.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_allInstances.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_allInstances.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_bounceSystem.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_bounceSystem.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_findInstance.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_findInstance.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_all.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_all.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_firstOnly.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_firstOnly.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_dataStoreAssignedPrimaryKey.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_jdkValuedEntity.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_jdkValuedEntity.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_objectAdapters.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_objectAdapters.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_primitiveValuedEntity.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_primitiveValuedEntity.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_wrapperValuedEntity.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_wrapperValuedEntity.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/AbstractEntityRepository.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntityRepository.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AssociatedEntitiesRepository.java
    incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/ParentEntitiesFixture.java
      - copied, changed from r1361752, incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/AssociatedEntitiesFixture.java
Removed:
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactory.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_allInstances.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_bounceSystem.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_findInstance.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_all.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_firstOnly.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_dataStoreAssignedPrimaryKey.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_jdkValuedEntity.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_objectAdapters.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_primitiveValuedEntity.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_wrapperValuedEntity.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AssociatedEntitiesRepository.java
    incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/AssociatedEntitiesFixture.java
Modified:
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactoryTest.java
    incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Utils.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-metamodel/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/metamodel/specloader/validator/JdoMetaModelValidator.java
    incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java
    incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_serviceRegistry.java
    incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AggregatedEntity.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntity.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/SimpleEntity.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/ApplibValuedEntityRepository.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/AutoAssignedEntityRepository.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/JdkValuedEntityRepository.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java
    incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntityRepository.java

Copied: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectSpecIdAnnotationFacetFactory.java (from r1361752, incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectSpecIdAnnotationFacetFactory.java?p2=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectSpecIdAnnotationFacetFactory.java&p1=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactory.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectSpecIdAnnotationFacetFactory.java Tue Jul 17 07:02:16 2012
@@ -26,9 +26,9 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.AnnotationBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.object.objecttype.ObjectSpecIdFacet;
 
-public class ObjectTypeAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
+public class ObjectSpecIdAnnotationFacetFactory extends AnnotationBasedFacetFactoryAbstract {
 
-    public ObjectTypeAnnotationFacetFactory() {
+    public ObjectSpecIdAnnotationFacetFactory() {
         super(FeatureType.OBJECTS_ONLY);
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactoryTest.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactoryTest.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/objecttype/ObjectTypeAnnotationFacetFactoryTest.java Tue Jul 17 07:02:16 2012
@@ -35,11 +35,11 @@ import org.apache.isis.core.progmodel.fa
 
 public class ObjectTypeAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4TestCase {
 
-    private ObjectTypeAnnotationFacetFactory facetFactory;
+    private ObjectSpecIdAnnotationFacetFactory facetFactory;
 
     @Before
     public void setUp() throws Exception {
-        facetFactory = new ObjectTypeAnnotationFacetFactory();
+        facetFactory = new ObjectSpecIdAnnotationFacetFactory();
     }
 
     @Test

Modified: incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java (original)
+++ incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java Tue Jul 17 07:02:16 2012
@@ -95,7 +95,7 @@ import org.apache.isis.core.progmodel.fa
 import org.apache.isis.core.progmodel.facets.object.named.staticmethod.NamedFacetViaSingularNameStaticMethodFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.notpersistable.NotPersistableAnnotationFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.notpersistable.NotPersistableMarkerInterfacesFacetFactory;
-import org.apache.isis.core.progmodel.facets.object.objecttype.ObjectTypeAnnotationFacetFactory;
+import org.apache.isis.core.progmodel.facets.object.objecttype.ObjectSpecIdAnnotationFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.objecttype.ObjectTypeDerivedFromClassNameFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.orderactions.ActionOrderAnnotationFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.orderfields.FieldOrderAnnotationFacetFactory;
@@ -252,7 +252,7 @@ public class ProgrammingModelFacetsJava5
         addFactory(HiddenFacetViaHideMethodFacetFactory.class);
 
         // objects
-        addFactory(ObjectTypeAnnotationFacetFactory.class);
+        addFactory(ObjectSpecIdAnnotationFacetFactory.class);
         addFactory(IconMethodFacetFactory.class);
 
         addFactory(CreatedCallbackFacetFactory.class);

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml Tue Jul 17 07:02:16 2012
@@ -113,6 +113,7 @@
         </dependency>
 
 		<!-- 
+		-->
 		<dependency>
 			<groupId>com.microsoft.sqlserver</groupId>
 			<artifactId>jdbc</artifactId>
@@ -121,7 +122,6 @@
 			<optional>true</optional>
 			<systemPath>${basedir}/lib/sqljdbc4.jar</systemPath>
 		</dependency>
-		-->
 
 	</dependencies>
 </project>

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Utils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Utils.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Utils.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Utils.java Tue Jul 17 07:02:16 2012
@@ -78,8 +78,8 @@ public class Utils {
 
         // last one wins!
         configureHsqlDbFileBased(props);
-        configureForMsSqlServer(props);
         configureHsqlDbInMemory(props);
+        configureForMsSqlServer(props);
 
         props.put("isis.persistor.datanucleus.impl.datanucleus.autoCreateSchema", "true");
         props.put("isis.persistor.datanucleus.impl.datanucleus.validateTables", "true");
@@ -112,12 +112,12 @@ public class Utils {
 
     
 
-    static long toMillis(int year, int monthOfYear, int dayOfMonth) {
+    public static long toMillis(int year, int monthOfYear, int dayOfMonth) {
         LocalDate d = new LocalDate(year, monthOfYear, dayOfMonth);
         return d.toDateMidnight().getMillis();
     }
 
-    static long toMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute) {
+    public static long toMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute) {
         LocalDateTime d = new LocalDateTime(year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour, secondOfMinute);
         return d.toDateTime().getMillis();
     }

Added: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/refs/Persistence_persist_parent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/refs/Persistence_persist_parent.java?rev=1362378&view=auto
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/refs/Persistence_persist_parent.java (added)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/refs/Persistence_persist_parent.java Tue Jul 17 07:02:16 2012
@@ -0,0 +1,94 @@
+/*
+ *  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.isis.runtimes.dflt.objectstores.jdo.datanucleus.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
+import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
+import org.apache.isis.tck.dom.refs.ParentEntity;
+import org.apache.isis.tck.dom.refs.ParentEntityRepository;
+import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;
+
+public class Persistence_persist_parent {
+
+    private ParentEntityRepository repo = new ParentEntityRepository();
+    
+    @Rule
+    public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+        //.with(Utils.listenerToDeleteFrom("CHILDENTITY"))
+        .with(Utils.listenerToDeleteFrom("PARENTENTITY"))
+        .withServices(repo)
+        .build();
+
+    @Test
+    public void persistTwo() throws Exception {
+        iswf.beginTran();
+        repo.newEntity().setName("Parent 1");
+        repo.newEntity().setName("Parent 2");
+        iswf.commitTran();
+
+        iswf.bounceSystem();
+        
+        iswf.beginTran();
+        List<ParentEntity> list = repo.list();
+        assertThat(list.size(), is(2));
+        iswf.commitTran();
+    }
+
+//    @Test
+//    public void persistAllValues() throws Exception {
+//        iswf.beginTran();
+//        PrimitiveValuedEntity entity = repo.newEntity();
+//        entity.setId(1);
+//        entity.setBooleanProperty(true);
+//        entity.setByteProperty((byte)123);
+//        entity.setDoubleProperty(9876543210987.0);
+//        entity.setFloatProperty(123456.0f);
+//        entity.setIntProperty(456);
+//        entity.setLongProperty(12345678901L);
+//        entity.setShortProperty((short)4567);
+//        entity.setCharProperty('X');
+//        
+//        iswf.commitTran();
+//
+//        iswf.bounceSystem();
+//        
+//        iswf.beginTran();
+//        PrimitiveValuedEntity entityRetrieved = repo.list().get(0);
+//        assertThat(entityRetrieved.getBooleanProperty(), is(true));
+//        assertThat(entityRetrieved.getByteProperty(), is((byte)123));
+//        assertThat(entityRetrieved.getDoubleProperty(), is(9876543210987.0));
+//        assertThat(entityRetrieved.getFloatProperty(), is(123456.0f));
+//        assertThat(entityRetrieved.getIntProperty(), is(456));
+//        assertThat(entityRetrieved.getLongProperty(), is(12345678901L));
+//        assertThat(entityRetrieved.getShortProperty(), is((short)4567));
+//        assertThat(entityRetrieved.getCharProperty(), is('X'));
+//        
+//        iswf.commitTran();
+//    }
+
+}

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_allInstances.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_allInstances.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_allInstances.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_allInstances.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_allInstances.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_allInstances.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_allInstances.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
@@ -26,6 +26,7 @@ import java.util.List;
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_bounceSystem.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_bounceSystem.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_bounceSystem.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_bounceSystem.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_bounceSystem.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_bounceSystem.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_bounceSystem.java Tue Jul 17 07:02:16 2012
@@ -16,11 +16,12 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;
 

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_findInstance.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_findInstance.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_findInstance.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_findInstance.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_findInstance.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_findInstance.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_findInstance.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
@@ -26,6 +26,7 @@ import static org.junit.Assert.assertTha
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_all.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_all.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_all.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_all.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_all.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_all.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_all.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
@@ -31,6 +31,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_firstOnly.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_firstOnly.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_firstOnly.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_firstOnly.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_firstOnly.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_namedQuery_firstOnly.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_namedQuery_firstOnly.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
@@ -29,6 +29,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_dataStoreAssignedPrimaryKey.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_dataStoreAssignedPrimaryKey.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_dataStoreAssignedPrimaryKey.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
@@ -26,6 +26,7 @@ import java.util.List;
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.AutoAssignedEntity;
 import org.apache.isis.tck.dom.scalars.AutoAssignedEntityRepository;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_jdkValuedEntity.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_jdkValuedEntity.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_jdkValuedEntity.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_jdkValuedEntity.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_jdkValuedEntity.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_jdkValuedEntity.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_jdkValuedEntity.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.nullValue;
@@ -33,6 +33,7 @@ import org.joda.time.LocalDateTime;
 import org.junit.Rule;
 import org.junit.Test;
 
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.JdkValuedEntity;
 import org.apache.isis.tck.dom.scalars.JdkValuedEntityRepository;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_objectAdapters.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_objectAdapters.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_objectAdapters.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_objectAdapters.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_objectAdapters.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_objectAdapters.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_objectAdapters.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
@@ -28,6 +28,7 @@ import org.junit.Test;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_primitiveValuedEntity.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_primitiveValuedEntity.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_primitiveValuedEntity.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_primitiveValuedEntity.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_primitiveValuedEntity.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_primitiveValuedEntity.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_primitiveValuedEntity.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
@@ -28,6 +28,7 @@ import org.junit.Test;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;

Copied: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_wrapperValuedEntity.java (from r1361752, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_wrapperValuedEntity.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_wrapperValuedEntity.java?p2=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_wrapperValuedEntity.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_wrapperValuedEntity.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/Persistence_persist_wrapperValuedEntity.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/jdo/datanucleus/scalar/Persistence_persist_wrapperValuedEntity.java Tue Jul 17 07:02:16 2012
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus;
+package org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.scalar;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
@@ -28,6 +28,7 @@ import org.junit.Test;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.Utils;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntityRepository;

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-metamodel/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/metamodel/specloader/validator/JdoMetaModelValidator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-metamodel/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/metamodel/specloader/validator/JdoMetaModelValidator.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-metamodel/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/metamodel/specloader/validator/JdoMetaModelValidator.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-metamodel/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/metamodel/specloader/validator/JdoMetaModelValidator.java Tue Jul 17 07:02:16 2012
@@ -54,9 +54,13 @@ public class JdoMetaModelValidator exten
     private void ensureAllSpecificationsValid() throws ClassNotFoundException {
         final Collection<ObjectSpecification> objectSpecs = getSpecificationLoader().allSpecifications();
         for (final ObjectSpecification objSpec : objectSpecs) {
-            ensureNotAnnotatedAsBothEntityAndEmbeddedOnly(objSpec);
+            
+            // TODO: seems that DataNucleus does require to be annotated as both.
+            // ensureNotAnnotatedAsBothEntityAndEmbeddedOnly(objSpec);
+            
             // there is no requirement to ensure that there is a primary key property;
             // can get the value directly from JDO
+            
             ensureEntityIfAnnotatedAsSuchAndConcreteHasDiscriminatorFacet(objSpec);
         }
     }

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/main/java/org/apache/isis/runtimes/dflt/testsupport/IsisSystemWithFixtures.java Tue Jul 17 07:02:16 2012
@@ -55,7 +55,7 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures.Fixtures.Initialization;
 import org.apache.isis.security.dflt.authentication.AuthenticationRequestDefault;
 import org.apache.isis.tck.dom.refs.AggregatedEntity;
-import org.apache.isis.tck.dom.refs.AssociatedEntitiesRepository;
+import org.apache.isis.tck.dom.refs.ParentEntityRepository;
 import org.apache.isis.tck.dom.refs.ParentEntity;
 import org.apache.isis.tck.dom.refs.ReferencingEntity;
 import org.apache.isis.tck.dom.refs.SimpleEntity;
@@ -134,7 +134,7 @@ public class IsisSystemWithFixtures impl
             NO_INIT
         }
 
-        public AssociatedEntitiesRepository associatedEntitiesRepository = new AssociatedEntitiesRepository();
+        public ParentEntityRepository associatedEntitiesRepository = new ParentEntityRepository();
 
         public ApplibValuedEntity ave1, ave2; 
         public JdkValuedEntity jve1, jve2;

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_serviceRegistry.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_serviceRegistry.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_serviceRegistry.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_serviceRegistry.java Tue Jul 17 07:02:16 2012
@@ -32,7 +32,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
-import org.apache.isis.tck.dom.refs.AssociatedEntitiesRepository;
+import org.apache.isis.tck.dom.refs.ParentEntityRepository;
 import org.apache.isis.tck.dom.refs.SimpleEntity;
 
 public class InMemoryObjectStoreTest_serviceRegistry {
@@ -55,8 +55,8 @@ public class InMemoryObjectStoreTest_ser
 
     @Test
     public void getOidForServices() throws Exception {
-        final Oid oidForService = getStore().getOidForService(iswf.loadSpecification(AssociatedEntitiesRepository.class));
-        assertEquals(RootOidDefault.create(ObjectSpecId.of("AssociatedEntities"), "1"), oidForService);
+        final Oid oidForService = getStore().getOidForService(iswf.loadSpecification(ParentEntityRepository.class));
+        assertEquals(RootOidDefault.create(ObjectSpecId.of("ParentEntities"), "1"), oidForService);
     }
 
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/runtime/persistence/PersistorSessionHydratorTest.java Tue Jul 17 07:02:16 2012
@@ -39,7 +39,7 @@ import org.apache.isis.runtimes.dflt.obj
 import org.apache.isis.runtimes.dflt.runtime.system.persistence.IdentifierGenerator;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
 import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures.Fixtures.Initialization;
-import org.apache.isis.tck.dom.refs.AssociatedEntitiesRepository;
+import org.apache.isis.tck.dom.refs.ParentEntityRepository;
 import org.apache.isis.tck.dom.refs.SimpleEntity;
 
 public class PersistorSessionHydratorTest {
@@ -53,9 +53,9 @@ public class PersistorSessionHydratorTes
     {
         context.checking(new Expectations() {
             {
-                allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(ObjectSpecId.of("AssociatedEntities"))), with(an(AssociatedEntitiesRepository.class)));
+                allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(ObjectSpecId.of("ParentEntities"))), with(an(ParentEntityRepository.class)));
                 will(returnValue("1"));
-                allowing(mockIdentifierGenerator).createPersistentIdentifierFor(with(equalTo(ObjectSpecId.of("AssociatedEntities"))), with(an(AssociatedEntitiesRepository.class)), with(any(RootOid.class)));
+                allowing(mockIdentifierGenerator).createPersistentIdentifierFor(with(equalTo(ObjectSpecId.of("ParentEntities"))), with(an(ParentEntityRepository.class)), with(any(RootOid.class)));
                 will(returnValue("1"));
                 
                 allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(ObjectSpecId.of("SMPL"))), with(an(SimpleEntity.class)));

Copied: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/AbstractEntityRepository.java (from r1361752, incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/AbstractEntityRepository.java?p2=incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/AbstractEntityRepository.java&p1=incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/AbstractEntityRepository.java Tue Jul 17 07:02:16 2012
@@ -17,58 +17,55 @@
  *  under the License.
  */
 
-package org.apache.isis.tck.dom.scalars;
+package org.apache.isis.tck.dom;
 
 import java.util.List;
 import java.util.Map;
 
 import org.apache.isis.applib.AbstractFactoryAndRepository;
 import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.annotation.QueryOnly;
 import org.apache.isis.applib.query.Query;
 import org.apache.isis.applib.query.QueryDefault;
 
-@Named("PrimitiveValuedEntities")
-@ObjectType("PrimitiveValuedEntities")
-public class PrimitiveValuedEntityRepository extends AbstractFactoryAndRepository {
+public abstract class AbstractEntityRepository<T> extends AbstractFactoryAndRepository {
 
-    @Override
-    public String getId() {
-        return "PrimitiveValuedEntities";
+    private final Class<T> entityClass;
+    private final String serviceId;
+    
+    public AbstractEntityRepository(Class<T> entityClass, String serviceId) {
+        this.entityClass = entityClass;
+        this.serviceId = serviceId;
     }
 
-    @QueryOnly
-    @MemberOrder(sequence = "1")
-    public List<PrimitiveValuedEntity> list() {
-        return allInstances(PrimitiveValuedEntity.class);
+    @Override
+    public final String getId() {
+        return serviceId;
     }
 
     @QueryOnly
     @MemberOrder(sequence = "1")
-    public PrimitiveValuedEntity findById(int id) {
-        final Query<PrimitiveValuedEntity> query = new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, PrimitiveValuedEntity.class.getName() + "#pk", "id", id);
-        return this.firstMatch(query);
+    public List<T> list() {
+        return allInstances(entityClass);
     }
 
     @MemberOrder(sequence = "2")
-    public PrimitiveValuedEntity newEntity() {
-        final PrimitiveValuedEntity entity = newTransientInstance(PrimitiveValuedEntity.class);
+    public T newEntity() {
+        final T entity = newTransientInstance(entityClass);
         persist(entity);
         return entity;
     }
     
     @Programmatic
-    public PrimitiveValuedEntity findByNamedQueryFirstOnly(String queryName, Map<String, Object> argumentByParameterName) {
-        final Query<PrimitiveValuedEntity> query = new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, queryName, argumentByParameterName); 
+    public T findByNamedQueryFirstOnly(String queryName, Map<String, Object> argumentByParameterName) {
+        final Query<T> query = new QueryDefault<T>(entityClass, queryName, argumentByParameterName); 
         return this.firstMatch(query);
     }
 
     @Programmatic
-    public List<PrimitiveValuedEntity> findByNamedQueryAll(String queryName, Map<String, Object> argumentByParameterName) {
-        final Query<PrimitiveValuedEntity> query = new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, queryName, argumentByParameterName); 
+    public List<T> findByNamedQueryAll(String queryName, Map<String, Object> argumentByParameterName) {
+        final Query<T> query = new QueryDefault<T>(entityClass, queryName, argumentByParameterName); 
         return this.allMatches(query);
     }
     

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AggregatedEntity.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AggregatedEntity.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AggregatedEntity.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AggregatedEntity.java Tue Jul 17 07:02:16 2012
@@ -23,6 +23,12 @@ import org.apache.isis.applib.annotation
 import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.ObjectType;
 
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.EmbeddedOnly
+@javax.jdo.annotations.Discriminator("RFCG")
+@javax.persistence.Entity
+@javax.persistence.DiscriminatorValue("RFCG")
+@javax.persistence.Embeddable
 @Aggregated
 @ObjectType("AGGR")
 public class AggregatedEntity extends BaseEntity {

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntity.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntity.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntity.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntity.java Tue Jul 17 07:02:16 2012
@@ -22,12 +22,20 @@ package org.apache.isis.tck.dom.refs;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.jdo.annotations.IdentityType;
+
 import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.NotPersisted;
 import org.apache.isis.applib.annotation.ObjectType;
 import org.apache.isis.applib.annotation.Optional;
 import org.apache.isis.applib.util.TitleBuffer;
 
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PRNT")
+@javax.jdo.annotations.Inheritance()
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@javax.persistence.Entity
+@javax.persistence.DiscriminatorValue("PRNT")
 @ObjectType("PRNT")
 public class ParentEntity extends BaseEntity {
 
@@ -39,6 +47,7 @@ public class ParentEntity extends BaseEn
     }
     // }}
     
+    
     // {{ Name
     private String name;
     @MemberOrder(sequence = "1")

Copied: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntityRepository.java (from r1361752, incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AssociatedEntitiesRepository.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntityRepository.java?p2=incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntityRepository.java&p1=incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AssociatedEntitiesRepository.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/AssociatedEntitiesRepository.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ParentEntityRepository.java Tue Jul 17 07:02:16 2012
@@ -19,25 +19,24 @@
 
 package org.apache.isis.tck.dom.refs;
 
-import java.util.List;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
 import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
 import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.tck.dom.AbstractEntityRepository;
+
+@Named("ParentEntities")
+@ObjectType("ParentEntities")
+public class ParentEntityRepository extends AbstractEntityRepository<ParentEntity> {
 
-@ObjectType("AssociatedEntities")
-public class AssociatedEntitiesRepository extends AbstractFactoryAndRepository {
+    public ParentEntityRepository() {
+        super(ParentEntity.class, "ParentEntities");
+    }
     
     public BaseEntity someAction() { return null; }
     public SimpleEntity someAction2() { return null; }
     public ReferencingEntity someAction3() { return null; }
     public ParentEntity someAction4() { return null; }
  
-    @MemberOrder(sequence = "1")
-    public List<ParentEntity> list() {
-        return allInstances(ParentEntity.class);
-    }
-
     @MemberOrder(sequence = "2")
     public ParentEntity newEntity(final String name) {
         final ParentEntity entity = newTransientInstance(ParentEntity.class);

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java Tue Jul 17 07:02:16 2012
@@ -21,14 +21,22 @@ package org.apache.isis.tck.dom.refs;
 
 import java.util.List;
 
+import javax.jdo.annotations.IdentityType;
+
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.annotation.NotPersisted;
 import org.apache.isis.applib.annotation.ObjectType;
 
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("RFCG")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@javax.persistence.Entity
+@javax.persistence.DiscriminatorValue("RFCG")
 @ObjectType("RFCG")
 public class ReferencingEntity extends BaseEntity {
     
+    
     // {{ Reference
     private SimpleEntity reference;
 
@@ -42,7 +50,7 @@ public class ReferencingEntity extends B
 
     // }}
 
-    // {{ AggregatedReference
+    // {{ AggregatedEntity
     private AggregatedEntity aggregatedReference;
 
     public AggregatedEntity getAggregatedReference() {

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/SimpleEntity.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/SimpleEntity.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/SimpleEntity.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/SimpleEntity.java Tue Jul 17 07:02:16 2012
@@ -21,11 +21,18 @@ package org.apache.isis.tck.dom.refs;
 
 import java.util.Date;
 
+import javax.jdo.annotations.IdentityType;
+
 import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.NotPersisted;
 import org.apache.isis.applib.annotation.ObjectType;
 import org.apache.isis.applib.annotation.Optional;
 
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("SMPL")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@javax.persistence.Entity
+@javax.persistence.DiscriminatorValue("SMPL")
 @ObjectType("SMPL")
 public class SimpleEntity extends BaseEntity {
     

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/ApplibValuedEntityRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/ApplibValuedEntityRepository.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/ApplibValuedEntityRepository.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/ApplibValuedEntityRepository.java Tue Jul 17 07:02:16 2012
@@ -19,34 +19,15 @@
 
 package org.apache.isis.tck.dom.scalars;
 
-import java.util.List;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Named;
 import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.QueryOnly;
+import org.apache.isis.tck.dom.AbstractEntityRepository;
 
 @Named("ApplibValuedEntities")
 @ObjectType("ApplibValuedEntities")
-public class ApplibValuedEntityRepository extends AbstractFactoryAndRepository {
-
-    @Override
-    public String getId() {
-        return "ApplibValuedEntities";
-    }
+public class ApplibValuedEntityRepository extends AbstractEntityRepository<ApplibValuedEntity> {
 
-    @QueryOnly
-    @MemberOrder(sequence = "1")
-    public List<ApplibValuedEntity> list() {
-        return allInstances(ApplibValuedEntity.class);
+    public ApplibValuedEntityRepository() {
+        super(ApplibValuedEntity.class, "ApplibValuedEntities");
     }
-
-    @MemberOrder(sequence = "2")
-    public ApplibValuedEntity newEntity() {
-        final ApplibValuedEntity entity = newTransientInstance(ApplibValuedEntity.class);
-        persist(entity);
-        return entity;
-    }
-
 }

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/AutoAssignedEntityRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/AutoAssignedEntityRepository.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/AutoAssignedEntityRepository.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/AutoAssignedEntityRepository.java Tue Jul 17 07:02:16 2012
@@ -19,33 +19,15 @@
 
 package org.apache.isis.tck.dom.scalars;
 
-import java.util.List;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Named;
 import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.QueryOnly;
+import org.apache.isis.tck.dom.AbstractEntityRepository;
 
 @Named("AutoAssignedEntities")
 @ObjectType("AutoAssignedEntities")
-public class AutoAssignedEntityRepository extends AbstractFactoryAndRepository {
-
-    @Override
-    public String getId() {
-        return "AutoAssignedEntities";
-    }
-
-    @QueryOnly
-    @MemberOrder(sequence = "1")
-    public List<AutoAssignedEntity> list() {
-        return allInstances(AutoAssignedEntity.class);
-    }
+public class AutoAssignedEntityRepository extends AbstractEntityRepository<AutoAssignedEntity> {
 
-    @MemberOrder(sequence = "2")
-    public AutoAssignedEntity newEntity() {
-        final AutoAssignedEntity entity = newTransientInstance(AutoAssignedEntity.class);
-        persist(entity);
-        return entity;
+    public AutoAssignedEntityRepository() {
+        super(AutoAssignedEntity.class, "AutoAssignedEntities");
     }
 }

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/JdkValuedEntityRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/JdkValuedEntityRepository.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/JdkValuedEntityRepository.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/JdkValuedEntityRepository.java Tue Jul 17 07:02:16 2012
@@ -19,33 +19,16 @@
 
 package org.apache.isis.tck.dom.scalars;
 
-import java.util.List;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Named;
 import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.QueryOnly;
+import org.apache.isis.tck.dom.AbstractEntityRepository;
 
 @Named("JdkValuedEntities")
 @ObjectType("JdkValuedEntities")
-public class JdkValuedEntityRepository extends AbstractFactoryAndRepository {
-
-    public String getId() {
-        return "JdkValuedEntities";
-    }
-
-    @MemberOrder(sequence = "1")
-    @QueryOnly
-    public List<JdkValuedEntity> list() {
-        return allInstances(JdkValuedEntity.class);
-    }
+public class JdkValuedEntityRepository extends AbstractEntityRepository<JdkValuedEntity> {
 
-    @MemberOrder(sequence = "2")
-    public JdkValuedEntity newEntity() {
-        final JdkValuedEntity entity = newTransientInstance(JdkValuedEntity.class);
-        persist(entity);
-        return entity;
+    public JdkValuedEntityRepository() {
+        super(JdkValuedEntity.class, "JdkValuedEntities");
     }
 
 }

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/PrimitiveValuedEntityRepository.java Tue Jul 17 07:02:16 2012
@@ -19,57 +19,27 @@
 
 package org.apache.isis.tck.dom.scalars;
 
-import java.util.List;
-import java.util.Map;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
 import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Named;
 import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.annotation.QueryOnly;
 import org.apache.isis.applib.query.Query;
 import org.apache.isis.applib.query.QueryDefault;
+import org.apache.isis.tck.dom.AbstractEntityRepository;
 
 @Named("PrimitiveValuedEntities")
 @ObjectType("PrimitiveValuedEntities")
-public class PrimitiveValuedEntityRepository extends AbstractFactoryAndRepository {
-
-    @Override
-    public String getId() {
-        return "PrimitiveValuedEntities";
-    }
+public class PrimitiveValuedEntityRepository extends AbstractEntityRepository<PrimitiveValuedEntity> {
 
-    @QueryOnly
-    @MemberOrder(sequence = "1")
-    public List<PrimitiveValuedEntity> list() {
-        return allInstances(PrimitiveValuedEntity.class);
+    public PrimitiveValuedEntityRepository() {
+        super(PrimitiveValuedEntity.class, "PrimitiveValuedEntities");
     }
 
     @QueryOnly
     @MemberOrder(sequence = "1")
     public PrimitiveValuedEntity findById(int id) {
-        final Query<PrimitiveValuedEntity> query = new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, PrimitiveValuedEntity.class.getName() + "#pk", "id", id);
+        final Query<PrimitiveValuedEntity> query = 
+                new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, PrimitiveValuedEntity.class.getName() + "#pk", "id", id);
         return this.firstMatch(query);
     }
-
-    @MemberOrder(sequence = "2")
-    public PrimitiveValuedEntity newEntity() {
-        final PrimitiveValuedEntity entity = newTransientInstance(PrimitiveValuedEntity.class);
-        persist(entity);
-        return entity;
-    }
-    
-    @Programmatic
-    public PrimitiveValuedEntity findByNamedQueryFirstOnly(String queryName, Map<String, Object> argumentByParameterName) {
-        final Query<PrimitiveValuedEntity> query = new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, queryName, argumentByParameterName); 
-        return this.firstMatch(query);
-    }
-
-    @Programmatic
-    public List<PrimitiveValuedEntity> findByNamedQueryAll(String queryName, Map<String, Object> argumentByParameterName) {
-        final Query<PrimitiveValuedEntity> query = new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, queryName, argumentByParameterName); 
-        return this.allMatches(query);
-    }
-    
 }

Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntityRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntityRepository.java?rev=1362378&r1=1362377&r2=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntityRepository.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/scalars/WrapperValuedEntityRepository.java Tue Jul 17 07:02:16 2012
@@ -19,33 +19,16 @@
 
 package org.apache.isis.tck.dom.scalars;
 
-import java.util.List;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Named;
 import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.QueryOnly;
+import org.apache.isis.tck.dom.AbstractEntityRepository;
 
 @Named("WrapperValues")
 @ObjectType("WrapperValues")
-public class WrapperValuedEntityRepository extends AbstractFactoryAndRepository {
-
-    @Override
-    public String getId() {
-        return "wrapperValuedEntities";
-    }
+public class WrapperValuedEntityRepository extends AbstractEntityRepository<WrapperValuedEntity> {
 
-    @MemberOrder(sequence = "1")
-    @QueryOnly
-    public List<WrapperValuedEntity> list() {
-        return allInstances(WrapperValuedEntity.class);
+    public WrapperValuedEntityRepository() {
+        super(WrapperValuedEntity.class, "WrapperValuedEntities");
     }
 
-    @MemberOrder(sequence = "2")
-    public WrapperValuedEntity newEntity() {
-        final WrapperValuedEntity entity = newTransientInstance(WrapperValuedEntity.class);
-        persist(entity);
-        return entity;
-    }
 }

Copied: incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/ParentEntitiesFixture.java (from r1361752, incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/AssociatedEntitiesFixture.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/ParentEntitiesFixture.java?p2=incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/ParentEntitiesFixture.java&p1=incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/AssociatedEntitiesFixture.java&r1=1361752&r2=1362378&rev=1362378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/AssociatedEntitiesFixture.java (original)
+++ incubator/isis/trunk/framework/tck/tck-fixture/src/main/java/org/apache/isis/tck/fixture/refs/ParentEntitiesFixture.java Tue Jul 17 07:02:16 2012
@@ -20,10 +20,10 @@
 package org.apache.isis.tck.fixture.refs;
 
 import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.tck.dom.refs.AssociatedEntitiesRepository;
+import org.apache.isis.tck.dom.refs.ParentEntityRepository;
 import org.apache.isis.tck.dom.refs.ParentEntity;
 
-public class AssociatedEntitiesFixture extends AbstractFixture {
+public class ParentEntitiesFixture extends AbstractFixture {
 
     @Override
     public void install() {
@@ -41,9 +41,9 @@ public class AssociatedEntitiesFixture e
         return parent;
     }
 
-    private AssociatedEntitiesRepository parentEntityRepository;
+    private ParentEntityRepository parentEntityRepository;
 
-    public void setParentEntityRepository(final AssociatedEntitiesRepository parentEntityRepository) {
+    public void setParentEntityRepository(final ParentEntityRepository parentEntityRepository) {
         this.parentEntityRepository = parentEntityRepository;
     }
 



Mime
View raw message