You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/07/25 11:30:05 UTC

[47/48] isis git commit: ISIS-1178: mothballing the tck tests.

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
new file mode 100644
index 0000000..d6b6a24
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
@@ -0,0 +1,74 @@
+/*
+ *  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.core.tck.dom;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.annotation.QueryOnly;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.query.Query;
+import org.apache.isis.applib.query.QueryDefault;
+
+public abstract class AbstractEntityRepository<T> extends AbstractFactoryAndRepository {
+
+    private final Class<T> entityClass;
+    private final String serviceId;
+    
+    public AbstractEntityRepository(Class<T> entityClass, String serviceId) {
+        this.entityClass = entityClass;
+        this.serviceId = serviceId;
+    }
+
+    @Override
+    public final String getId() {
+        return serviceId;
+    }
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public List<T> list() {
+        return allInstances(entityClass);
+    }
+
+    @MemberOrder(sequence = "2")
+    public T newEntity() {
+        final T entity = newTransientInstance(entityClass);
+        persist(entity);
+        return entity;
+    }
+    
+    @Programmatic
+    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<T> findByNamedQueryAll(String queryName, Map<String, Object> argumentByParameterName) {
+        final Query<T> query = new QueryDefault<T>(entityClass, queryName, argumentByParameterName); 
+        return this.allMatches(query);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
new file mode 100644
index 0000000..2f4ed64
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
@@ -0,0 +1,76 @@
+/*
+ *  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.core.tck.dom.actions;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("RTNE")
+@ObjectType("RTNE")
+public class ActionsEntity extends AbstractDomainObject {
+
+    // {{ Id (Integer)
+    private Integer id;
+
+    @javax.jdo.annotations.PrimaryKey // must be on the getter.
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(final Integer id) {
+        this.id = id;
+    }
+    // }}
+
+    // {{ Title
+    public String title() {
+        return null;
+    }
+    // }}
+
+
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public ActionsEntity visibleAndInvokableAction() {
+        return this;
+    }
+
+    @Disabled
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public ActionsEntity visibleButUninvokableAction() {
+        return this;
+    }
+
+    @Hidden
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public ActionsEntity invisibleAction() {
+        return this;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
new file mode 100644
index 0000000..f53bca0
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
@@ -0,0 +1,126 @@
+/*
+ *  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.core.tck.dom.actions;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.spec.Specification;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("ActionsEntities")
+@ObjectType("ActionsEntities")
+@DomainService
+public class ActionsEntityRepository extends AbstractEntityRepository<ActionsEntity> {
+
+    public ActionsEntityRepository() {
+        super(ActionsEntity.class, "ActionsEntities");
+    }
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public ActionsEntity findById(@Named("id") int id) {
+        return findByIdIfAny(id);
+    }
+
+    @ActionSemantics(Of.IDEMPOTENT)
+    @MemberOrder(sequence = "1")
+    public ActionsEntity findByIdIdempotent(@Named("id") int id) {
+        return findByIdIfAny(id);
+    }
+
+    @ActionSemantics(Of.NON_IDEMPOTENT)
+    @MemberOrder(sequence = "1")
+    public ActionsEntity findByIdNotIdempotent(@Named("id") int id) {
+        return findByIdIfAny(id);
+    }
+
+    private ActionsEntity findByIdIfAny(int id) {
+        List<ActionsEntity> subList = subList(id, id+1);
+        return subList.isEmpty()?null:subList.get(0);
+    }
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public List<ActionsEntity> subList(
+            @MustSatisfy(IntegerCannotBeNegative.class)
+            @Named("from") int from, 
+            @MustSatisfy(IntegerCannotBeNegative.class)
+            @Named("to") int to) {
+        List<ActionsEntity> list = list();
+        int toChecked = Math.min(to, list.size());
+        int fromChecked = Math.min(from, toChecked);
+        return list.subList(fromChecked, toChecked);
+    }
+    public String validateSubList(final int from, final int to) {
+        if(from > to) {
+            return "'from' cannot be larger than 'to'";
+        }
+        return null;
+    }
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public boolean contains(@Named("searchFor") ActionsEntity entity, @Named("from") int from, @Named("to") int to) {
+        List<ActionsEntity> list = subList(from, to);
+        return list.contains(entity);
+    }
+
+    public static class IntegerCannotBeNegative implements Specification {
+        @Override
+        public String satisfies(Object obj) {
+            if(!(obj instanceof Integer)) {
+                return null;
+            } 
+            Integer integer = (Integer) obj;
+            return integer.intValue() < 0? "Cannot be less than zero": null;
+        }
+    }
+
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public List<ActionsEntity> subListWithOptionalRange(
+            @Optional
+            @MustSatisfy(IntegerCannotBeNegative.class)
+            @Named("from") Integer from, 
+            @Optional
+            @MustSatisfy(IntegerCannotBeNegative.class)
+            @Named("to") Integer to) {
+        return subList(valueElseDefault(from, 0), valueElseDefault(to, Integer.MAX_VALUE));
+    }
+
+    public String validateSubListWithOptionalRange(final Integer from, final Integer to) {
+        return validateSubList(valueElseDefault(from, 0), valueElseDefault(to, Integer.MAX_VALUE));
+    }
+
+    private static int valueElseDefault(Integer value, int i) {
+        return value != null? value: i;
+    }
+    
+    @ActionSemantics(Of.IDEMPOTENT)
+    @MemberOrder(sequence = "90")
+    public String concatenate(@Named("str1") String str1, @Named("str2") String str2) {
+        return str1 + str2;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
new file mode 100644
index 0000000..3894d1a
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
@@ -0,0 +1,165 @@
+/*
+ *  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.core.tck.dom.busrules;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("BSRL")
+@javax.jdo.annotations.Query(
+        name="prmv_findByIntProperty", language="JDOQL",  
+        value="SELECT FROM org.apache.isis.tck.dom.busrules.BusRulesEntity WHERE intProperty == :i")
+@ObjectType("BSRL")
+public class BusRulesEntity extends AbstractDomainObject {
+
+    // {{ Id (Integer)
+    private Integer id;
+
+    @javax.jdo.annotations.PrimaryKey // must be on the getter.
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(final Integer id) {
+        this.id = id;
+    }
+    // }}
+
+    // {{ Title
+    public String title() {
+        return null;
+    }
+    // }}
+
+
+    // {{ visibleAndEditableProperty
+    private int visibleAndEditableProperty;
+
+    @MemberOrder(sequence = "1")
+    public int getVisibleAndEditableProperty() {
+        return visibleAndEditableProperty;
+    }
+
+    public void setVisibleAndEditableProperty(final int intProperty) {
+        this.visibleAndEditableProperty = intProperty;
+    }
+    // }}
+
+
+    // {{ visibleButNotEditableProperty
+    private int visibleButNotEditableProperty;
+
+    @Disabled
+    @MemberOrder(sequence = "2")
+    public int getVisibleButNotEditableProperty() {
+        return visibleButNotEditableProperty;
+    }
+
+    public void setVisibleButNotEditableProperty(final int intProperty) {
+        this.visibleButNotEditableProperty = intProperty;
+    }
+    // }}
+
+    // {{ invisibleProperty
+    private int invisibleProperty;
+
+    @Hidden
+    @MemberOrder(sequence = "3")
+    public int getInvisibleProperty() {
+        return invisibleProperty;
+    }
+
+    public void setInvisibleProperty(final int intProperty) {
+        this.invisibleProperty = intProperty;
+    }
+    // }}
+
+    
+    // {{ VisibleAndEditableCollection (Collection)
+    private List<BusRulesEntityChild> editableCollection = new ArrayList<BusRulesEntityChild>();
+
+    @MemberOrder(sequence = "11")
+    public List<BusRulesEntityChild> getVisibleAndEditableCollection() {
+        return editableCollection;
+    }
+
+    public void setVisibleAndEditableCollection(final List<BusRulesEntityChild> children) {
+        this.editableCollection = children;
+    }
+    // }}
+
+    
+    // {{ VisibleButNotEditableCollection (Collection)
+    private List<BusRulesEntityChild> notEditableCollection = new ArrayList<BusRulesEntityChild>();
+
+    @MemberOrder(sequence = "11")
+    public List<BusRulesEntityChild> getVisibleButNotEditableCollection() {
+        return notEditableCollection;
+    }
+
+    public void setVisibleButNotEditableCollection(final List<BusRulesEntityChild> children) {
+        this.notEditableCollection = children;
+    }
+    // }}
+
+    // {{ InvisibleCollection (Collection)
+    private List<BusRulesEntityChild> invisibleCollection = new ArrayList<BusRulesEntityChild>();
+
+    @Hidden
+    @MemberOrder(sequence = "11")
+    public List<BusRulesEntityChild> getInvisibleCollection() {
+        return invisibleCollection;
+    }
+
+    public void setInvisibleCollection(final List<BusRulesEntityChild> children) {
+        this.invisibleCollection = children;
+    }
+    // }}
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public BusRulesEntity visibleAndInvokableAction() {
+        return this;
+    }
+
+    @Disabled
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public BusRulesEntity visibleButUninvokableAction() {
+        return this;
+    }
+
+    @Hidden
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public BusRulesEntity invisibleAction() {
+        return this;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
new file mode 100644
index 0000000..5011c23
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
@@ -0,0 +1,55 @@
+/*
+ *  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.core.tck.dom.busrules;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("BSRC")
+@javax.jdo.annotations.Query(
+        name="prmv_findByIntProperty", language="JDOQL",  
+        value="SELECT FROM org.apache.isis.tck.dom.busrules.BusRulesEntityChild WHERE intProperty == :i")
+@ObjectType("BSRC")
+public class BusRulesEntityChild extends AbstractDomainObject {
+
+
+    // {{ Id (Integer)
+    private Integer id;
+
+    @javax.jdo.annotations.PrimaryKey // must be on the getter.
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(final Integer id) {
+        this.id = id;
+    }
+    // }}
+
+    // {{ Title
+    public String title() {
+        return null;
+    }
+    // }}
+
+
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
new file mode 100644
index 0000000..e13664c
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
@@ -0,0 +1,68 @@
+/*
+ *  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.core.tck.dom.busrules;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.query.Query;
+import org.apache.isis.applib.query.QueryDefault;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("BusinessRulesEntities")
+@ObjectType("BusinessRulesEntities")
+@DomainService
+public class BusRulesEntityRepository extends AbstractEntityRepository<BusRulesEntity> {
+
+    public BusRulesEntityRepository() {
+        super(BusRulesEntity.class, "BusinessRulesEntities");
+    }
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public BusRulesEntity findById(int id) {
+        final Query<BusRulesEntity> query = 
+                new QueryDefault<BusRulesEntity>(BusRulesEntity.class, BusRulesEntity.class.getName() + "#pk", "id", id);
+        return this.firstMatch(query);
+    }
+
+
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public BusRulesEntity visibleAndInvocableAction(@Named("id") int id) {
+        return this.findById(id);
+    }
+
+    @Disabled
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public BusRulesEntity visibleButNotInvocableAction(@Named("id") int id) {
+        return this.findById(id);
+    }
+
+    @Hidden
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public BusRulesEntity invisibleAction(int id) {
+        return this.findById(id);
+    }
+
+    
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
new file mode 100644
index 0000000..ac84e44
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
@@ -0,0 +1,24 @@
+/*
+ *  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.core.tck.dom.claimapp.claims;
+
+public interface Approver {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
new file mode 100644
index 0000000..09af5eb
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
@@ -0,0 +1,239 @@
+/*
+ *  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.core.tck.dom.claimapp.claims;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.value.Color;
+import org.apache.isis.applib.value.Date;
+
+public class Claim extends AbstractDomainObject {
+
+    // {{ Title
+    public String title() {
+        return getStatus() + " - " + getDate();
+    }
+
+    // }}
+
+    // {{ Lifecycle
+    public void created() {
+        status = "New";
+        date = new Date();
+    }
+
+    // }}
+
+    // {{ Description
+    private String description;
+
+    @MemberOrder(sequence = "1")
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(final String description) {
+        this.description = description;
+    }
+
+    public String defaultDescription() {
+        return "enter a description here";
+    }
+
+    // }}
+
+    // {{ Date
+    private Date date;
+
+    @MemberOrder(sequence = "2")
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(final Date date) {
+        this.date = date;
+    }
+
+    // }}
+
+    // {{ Status
+    private String status;
+
+    @Disabled
+    @MemberOrder(sequence = "3")
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(final String status) {
+        this.status = status;
+    }
+
+    // }}
+
+    // {{ Claimant
+    private Claimant claimant;
+
+    @Disabled
+    @MemberOrder(sequence = "4")
+    public Claimant getClaimant() {
+        return claimant;
+    }
+
+    public void setClaimant(final Claimant claimant) {
+        this.claimant = claimant;
+    }
+
+    // }}
+
+    // {{ BigDecimal
+    private BigDecimal bigDecimal;
+
+    @MemberOrder(sequence = "9")
+    public BigDecimal getBigDecimal() {
+        return bigDecimal;
+    }
+
+    public void setBigDecimal(final BigDecimal bigDecimal) {
+        this.bigDecimal = bigDecimal;
+    }
+
+    public void modifyBigDecimal(final BigDecimal bigDecimal) {
+        // check for no-op
+        if (bigDecimal == null || bigDecimal.equals(getBigDecimal())) {
+            return;
+        }
+        // associate new
+        setBigDecimal(bigDecimal);
+        // additional business logic
+        onModifyBigDecimal(bigDecimal);
+    }
+
+    public void clearBigDecimal() {
+        // check for no-op
+        if (getBigDecimal() == null) {
+            return;
+        }
+        // dissociate existing
+        setBigDecimal(null);
+        // additional business logic
+        onClearBigDecimal();
+    }
+
+    protected void onModifyBigDecimal(final BigDecimal bigDecimal) {
+    }
+
+    protected void onClearBigDecimal() {
+    }
+
+    // }}
+
+    // {{ Color
+    private Color color;
+
+    @MemberOrder(sequence = "8")
+    public Color getColor() {
+        return color;
+    }
+
+    public void setColor(final Color color) {
+        this.color = color;
+    }
+
+    public void modifyColor(final Color color) {
+        // check for no-op
+        if (color == null || color.equals(getColor())) {
+            return;
+        }
+        // associate new
+        setColor(color);
+        // additional business logic
+        onModifyColor(color);
+    }
+
+    public void clearColor() {
+        // check for no-op
+        if (getColor() == null) {
+            return;
+        }
+        // dissociate existing
+        setColor(null);
+        // additional business logic
+        onClearColor();
+    }
+
+    protected void onModifyColor(final Color color) {
+    }
+
+    protected void onClearColor() {
+    }
+
+    // }}
+
+    // {{ Approver
+    private Approver approver;
+
+    @Disabled
+    @MemberOrder(sequence = "5")
+    public Approver getApprover() {
+        return approver;
+    }
+
+    public void setApprover(final Approver approver) {
+        this.approver = approver;
+    }
+
+    // }}
+
+    // {{ Items
+    private final List<ClaimItem> items = new ArrayList<ClaimItem>();
+
+    @MemberOrder(sequence = "6")
+    public List<ClaimItem> getItems() {
+        return items;
+    }
+
+    public void addToItems(final ClaimItem item) {
+        items.add(item);
+    }
+
+    // }}
+
+    // {{ action: Submit
+    public void submit(final Approver approver) {
+        setStatus("Submitted");
+        setApprover(approver);
+    }
+
+    public String disableSubmit() {
+        return getStatus().equals("New") ? null : "Claim has already been submitted";
+    }
+
+    public Object[] defaultSubmit() {
+        return new Object[] { getClaimant().getApprover() };
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
new file mode 100644
index 0000000..0c80cb8
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
@@ -0,0 +1,77 @@
+/*
+ *  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.core.tck.dom.claimapp.claims;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.applib.value.Money;
+
+public class ClaimItem extends AbstractDomainObject {
+
+    // {{ Title
+    public String title() {
+        return getDescription();
+    }
+
+    // }}
+
+    // {{ DateIncurred
+    private Date dateIncurred;
+
+    @MemberOrder(sequence = "1")
+    public Date getDateIncurred() {
+        return dateIncurred;
+    }
+
+    public void setDateIncurred(final Date dateIncurred) {
+        this.dateIncurred = dateIncurred;
+    }
+
+    // }}
+
+    // {{ Description
+    private String description;
+
+    @MemberOrder(sequence = "2")
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(final String description) {
+        this.description = description;
+    }
+
+    // }}
+
+    // {{ Amount
+    private Money amount;
+
+    @MemberOrder(sequence = "3")
+    public Money getAmount() {
+        return amount;
+    }
+
+    public void setAmount(final Money price) {
+        this.amount = price;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
new file mode 100644
index 0000000..b743ecd
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
@@ -0,0 +1,36 @@
+/*
+ *  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.core.tck.dom.claimapp.claims;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Named;
+
+@Named("Claims")
+public interface ClaimRepository {
+
+    public List<Claim> allClaims();
+
+    public List<Claim> findClaims(@Named("Description") String description);
+
+    public List<Claim> claimsFor(Claimant claimant);
+
+    public Claim newClaim(Claimant claimant);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
new file mode 100644
index 0000000..6bd83cd
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
@@ -0,0 +1,46 @@
+/*
+ *  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.core.tck.dom.claimapp.claims;
+
+import java.util.List;
+
+public class ClaimRepositoryImpl implements ClaimRepository {
+
+    @Override
+    public List<Claim> allClaims() {
+        return null;
+    }
+
+    @Override
+    public List<Claim> findClaims(final String description) {
+        return null;
+    }
+
+    @Override
+    public List<Claim> claimsFor(final Claimant claimant) {
+        return null;
+    }
+
+    @Override
+    public Claim newClaim(final Claimant claimant) {
+        return null;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
new file mode 100644
index 0000000..707796a
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
@@ -0,0 +1,26 @@
+/*
+ *  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.core.tck.dom.claimapp.claims;
+
+public interface Claimant {
+
+    Approver getApprover();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
new file mode 100644
index 0000000..49fb002
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
@@ -0,0 +1,120 @@
+/*
+ *  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.core.tck.dom.claimapp.employees;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.When;
+import org.apache.isis.core.tck.dom.claimapp.claims.Approver;
+import org.apache.isis.core.tck.dom.claimapp.claims.Claimant;
+
+public class Employee extends AbstractDomainObject implements Claimant, Approver {
+
+    // {{ Title
+    public String title() {
+        return getName();
+    }
+
+    // }}
+
+    // {{ Name
+    private String name;
+
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public void modifyName(final String name) {
+        setName(name);
+    }
+
+    public void clearName() {
+        setName(null);
+    }
+
+    public boolean whetherHideName;
+
+    public boolean hideName() {
+        return whetherHideName;
+    }
+
+    public String reasonDisableName;
+
+    public String disableName() {
+        return reasonDisableName;
+    }
+
+    public String reasonValidateName;
+
+    public String validateName(final String name) {
+        return reasonValidateName;
+    }
+
+    // }}
+
+    // {{ Password
+    private String password;
+
+    @MemberOrder(sequence = "2")
+    @Disabled(when = When.ONCE_PERSISTED)
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(final String password) {
+        this.password = password;
+    }
+
+    // }}
+
+    // {{ Approver
+    private Approver approver;
+
+    @Override
+    @MemberOrder(sequence = "2")
+    public Approver getApprover() {
+        return approver;
+    }
+
+    public void setApprover(final Approver approver) {
+        this.approver = approver;
+    }
+
+    // }}
+
+    // {{ injected: EmployeeRepository
+    private EmployeeRepository employeeRepository;
+
+    public EmployeeRepository getEmployeeRepository() {
+        return employeeRepository;
+    }
+
+    public void setEmployeeRepository(final EmployeeRepository employeeRepository) {
+        this.employeeRepository = employeeRepository;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
new file mode 100644
index 0000000..d17f228
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
@@ -0,0 +1,32 @@
+/*
+ *  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.core.tck.dom.claimapp.employees;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Named;
+
+@Named("Employees")
+public interface EmployeeRepository {
+
+    public List<Employee> allEmployees();
+
+    public List<Employee> findEmployees(@Named("Name") String name);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
new file mode 100644
index 0000000..4f58cd5
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
@@ -0,0 +1,35 @@
+/*
+ *  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.core.tck.dom.claimapp.employees;
+
+import java.util.List;
+
+public class EmployeeRepositoryImpl implements EmployeeRepository {
+
+    @Override
+    public List<Employee> allEmployees() {
+        return null;
+    }
+
+    @Override
+    public List<Employee> findEmployees(final String name) {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
new file mode 100644
index 0000000..0383050
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
@@ -0,0 +1,31 @@
+/*
+ *  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.core.tck.dom.defaults;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.Hidden;
+
+@Hidden
+@DomainService
+public class HiddenRepository {
+
+    public String someAction() {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
new file mode 100644
index 0000000..b05f698
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
@@ -0,0 +1,112 @@
+/*
+ *  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.core.tck.dom.defaults;
+
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Title;
+
+public class WithDefaultsEntity extends AbstractDomainObject {
+
+    // {{ Name (string, title)
+    private String name;
+
+    @MemberOrder(sequence = "1")
+    @Title
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public String defaultName() {
+        return "default-name";
+    }
+
+    // }}
+
+    // {{ Flag (boolean)
+    private boolean flag;
+
+    @MemberOrder(sequence = "1")
+    public boolean getFlag() {
+        return flag;
+    }
+
+    public void setFlag(final boolean flag) {
+        this.flag = flag;
+    }
+
+    public boolean defaultFlag() {
+        return true;
+    }
+
+    // }}
+
+    // {{ AnInt (int)
+    private int anInt;
+
+    @MemberOrder(sequence = "1")
+    public int getAnInt() {
+        return anInt;
+    }
+
+    public void setAnInt(final int anInt) {
+        this.anInt = anInt;
+    }
+
+    public int defaultAnInt() {
+        return 42;
+    }
+
+    // }}
+
+    // {{ Other (property)
+    private WithDefaultsEntity other;
+
+    @MemberOrder(sequence = "1")
+    public WithDefaultsEntity getOther() {
+        return other;
+    }
+
+    public void setOtherEntity(final WithDefaultsEntity withDefaultsEntity) {
+        this.other = withDefaultsEntity;
+    }
+
+    public WithDefaultsEntity defaultOther() {
+        final List<WithDefaultsEntity> list = repository.list();
+        return list.size() > 0 ? list.get(list.size() - 1) : null;
+    }
+
+    // }}
+
+    // {{ injected: WithDefaultsEntityRepository
+    private WithDefaultsEntityRepository repository;
+
+    public void setWithDefaultsEntityRepository(final WithDefaultsEntityRepository repository) {
+        this.repository = repository;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
new file mode 100644
index 0000000..158f949
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
@@ -0,0 +1,58 @@
+/*
+ *  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.core.tck.dom.defaults;
+
+import java.util.List;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.QueryOnly;
+import org.apache.isis.applib.filter.Filter;
+
+@Named("Simples")
+@DomainService
+public class WithDefaultsEntityRepository extends AbstractFactoryAndRepository  {
+
+    @Override
+    public String getId() {
+        return "withDefaultsEntities";
+    }
+
+    @MemberOrder(sequence = "1")
+    @QueryOnly
+    public List<WithDefaultsEntity> list() {
+        final Filter<Object> filterPersistentOnly = new Filter<Object>() {
+
+            @Override
+            public boolean accept(final Object t) {
+                return getContainer().isPersistent(t);
+            }
+        };
+        return allMatches(WithDefaultsEntity.class, filterPersistentOnly);
+    }
+
+    @MemberOrder(sequence = "3")
+    public WithDefaultsEntity newTransientEntity() {
+        return newTransientInstance(WithDefaultsEntity.class);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
new file mode 100644
index 0000000..c92e560
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
@@ -0,0 +1,68 @@
+/*
+ *  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.core.tck.dom.movies;
+
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+@ObjectType("movies.MOVIE")
+public class Movie {
+
+    public String title() {
+        return name;
+    }
+
+    // {{ name: String 
+    private String name;
+    public String getName() {
+        return name;
+    }
+    public void setName(final String name) {
+        this.name = name;
+    }
+    // }}
+
+    // {{ director: Person 
+    private Person director;
+    public Person getDirector() {
+        return director;
+    }
+    public void setDirector(final Person director) {
+        this.director = director;
+    }
+    
+    // }}
+    
+    // {{ roles: List 
+    private final List<Role> roles = Lists.newArrayList();
+    public List<Role> getRoles() {
+        return roles;
+    }
+    public void addToRoles(final Role role) {
+        roles.add(role);
+    }
+    public void removeFromRoles(final Role role) {
+        roles.remove(role);
+    }
+    // }}
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
new file mode 100644
index 0000000..19d4986
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
@@ -0,0 +1,50 @@
+/*
+ *  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.core.tck.dom.movies;
+
+import java.util.List;
+
+import org.apache.isis.applib.DomainObjectContainer;
+
+public class MovieDomainRepository {
+    
+    public List<Person> allPersons() {
+        return container.allInstances(Person.class); 
+    }
+
+    public List<Movie> allMovies() {
+        return container.allInstances(Movie.class); 
+    }
+
+    public List<Role> allRoles() {
+        return container.allInstances(Role.class); 
+    }
+
+    
+    // {{ injected: DomainObjectContainer
+    private DomainObjectContainer container;
+
+    public void setDomainObjectContainer(final DomainObjectContainer container) {
+        this.container = container;
+    }
+    // }}
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
new file mode 100644
index 0000000..5eb7cd2
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
@@ -0,0 +1,54 @@
+/*
+ *  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.core.tck.dom.movies;
+
+import java.util.Date;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+@ObjectType("movies.PERSON")
+public class Person {
+    
+    public String title() {
+        return name;
+    }
+
+    // {{ name: String
+    private String name;
+    public String getName() {
+        return name;
+    }
+    public void setName(final String name) {
+        this.name = name;
+    }
+    // }}
+    
+
+    // {{ Date: java.util.Date
+    private Date date;
+    public Date getDate() {
+        return date;
+    }
+    public void setDate(final Date date) {
+        this.date = date;
+    }
+    // }}
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
new file mode 100644
index 0000000..6a8cd32
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
@@ -0,0 +1,54 @@
+/*
+ *  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.core.tck.dom.movies;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+
+@ObjectType("movies.ROLE")
+public class Role {
+    
+    public String title() {
+        return name;
+    }
+
+    // {{ name: String
+    private String name;
+    public String getName() {
+        return name;
+    }
+    public void setName(final String name) {
+        this.name = name;
+    }
+    // }}
+    
+    
+    // {{ actor: Person
+    private Person actor;
+    public Person getActor() {
+        return actor;
+    }
+    public void setActor(final Person actor) {
+        this.actor = actor;
+    }
+    // }}
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
new file mode 100755
index 0000000..1e4c352
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
@@ -0,0 +1,23 @@
+/*
+ *  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.core.tck.dom.poly;
+
+public interface Empty {
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
new file mode 100644
index 0000000..dd6190f
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
@@ -0,0 +1,36 @@
+/*
+ *  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.core.tck.dom.poly;
+
+
+public class EmptyEntityWithOwnProperty implements Empty {
+
+    // {{ Special: string
+    private String special;
+
+    public String getSpecial() {
+        return special;
+    }
+
+    public void setSpecial(final String special) {
+        this.special = special;
+    }
+    // }}
+    
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
new file mode 100755
index 0000000..3a73ff7
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
@@ -0,0 +1,110 @@
+/*
+ *  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.core.tck.dom.poly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * This class is the collection point of all the polymorphism and related tests.
+ * There is nothing really special about it, it is just a placeholder for the
+ * various tests related to polymorphism or recursion (JIRA ISIS-117 and
+ * ISIS-118).
+ * 
+ * @author Kevin
+ * 
+ */
+public class ReferencingPolyTypesEntity extends AbstractDomainObject {
+    
+    public String title() {
+        return string;
+    }
+
+    // {{ String type
+    private String string;
+
+    public String getString() {
+        return string;
+    }
+
+    public void setString(final String string) {
+        this.string = string;
+    }
+
+    // }}
+
+    // {{ PolyBaseClass collection
+    private List<StringBaseEntity> polyBaseClasses = new ArrayList<StringBaseEntity>();
+
+    public List<StringBaseEntity> getPolyBaseClasses() {
+        return polyBaseClasses;
+    }
+
+    public void setPolyBaseClasses(final List<StringBaseEntity> polyBaseClasses) {
+        this.polyBaseClasses = polyBaseClasses;
+    }
+
+    // }}
+
+    // {{ PolyInterfaceType: Can we store / restore properties by interface?
+    private Stringable polyInterfaceType;
+
+    public Stringable getPolyInterfaceType() {
+        return polyInterfaceType;
+    }
+
+    public void setPolyInterfaceType(final Stringable polyInterfaceType) {
+        this.polyInterfaceType = polyInterfaceType;
+    }
+
+    // }}
+
+    // {{ PolyInterface collection
+    private List<Stringable> stringables = new ArrayList<Stringable>();
+
+    public List<Stringable> getPolyInterfaces() {
+        return stringables;
+    }
+
+    public void setPolyInterfaces(final List<Stringable> stringables) {
+        this.stringables = stringables;
+    }
+
+    // }}
+
+    // {{ PolySelfRefClass: Can we store / restore classes that contain
+    // self-referencing collections?
+    private SelfReferencingEntity selfReferencingEntity;
+
+    public SelfReferencingEntity getPolySelfRefClass() {
+        return selfReferencingEntity;
+    }
+
+    public void setPolySelfRefClass(final SelfReferencingEntity selfReferencingEntity) {
+        this.selfReferencingEntity = selfReferencingEntity;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
new file mode 100755
index 0000000..59a4058
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
@@ -0,0 +1,85 @@
+/*
+ *  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.core.tck.dom.poly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * This test class is used to test that a class can contain a collection of
+ * itself.
+ * 
+ * Caveat: Every class instance can only be contained by 1 parent collection,
+ * and will only be contained once.
+ * 
+ * @author Kevin
+ * 
+ * @version $Rev$ $Date$
+ */
+
+public class SelfReferencingEntity extends AbstractDomainObject {
+
+    public String title() {
+        return string;
+    }
+
+    // {{ String type
+    private String string;
+    public String getString() {
+        return string;
+    }
+    public void setString(final String string) {
+        this.string = string;
+    }
+    // }}
+
+    // {{ PolyTestClass collection
+    private List<SelfReferencingEntity> polySelfRefClasses = new ArrayList<SelfReferencingEntity>();
+
+    public List<SelfReferencingEntity> getPolySelfRefClasses() {
+        return polySelfRefClasses;
+    }
+
+    public void setPolySelfRefClasses(final List<SelfReferencingEntity> polySelfRefClasses) {
+        this.polySelfRefClasses = polySelfRefClasses;
+    }
+
+    public void addToPolySelfRefClasses(final SelfReferencingEntity selfReferencingEntity) {
+        // check for no-op
+        if (selfReferencingEntity == null || getPolySelfRefClasses().contains(selfReferencingEntity)) {
+            return;
+        }
+        // associate new
+        getPolySelfRefClasses().add(selfReferencingEntity);
+    }
+
+    public void removeFromPolySelfRefClasses(final SelfReferencingEntity selfReferencingEntity) {
+        // check for no-op
+        if (selfReferencingEntity == null || !getPolySelfRefClasses().contains(selfReferencingEntity)) {
+            return;
+        }
+        // dissociate existing
+        getPolySelfRefClasses().remove(selfReferencingEntity);
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
new file mode 100755
index 0000000..4636a53
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
@@ -0,0 +1,50 @@
+/*
+ *  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.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * @author Kevin
+ * 
+ */
+public abstract class StringBaseEntity extends AbstractDomainObject {
+
+    public String title() {
+        return stringBase;
+    }
+
+    // {{ String type
+    private String stringBase;
+
+    public String getStringBase() {
+        return stringBase;
+    }
+
+    public void setStringBase(final String string) {
+        this.stringBase = string;
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
new file mode 100755
index 0000000..748997c
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
@@ -0,0 +1,49 @@
+/*
+ *  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.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ * 
+ */
+public class StringBaseEntitySub extends StringBaseEntity {
+    
+    @Override
+    public String title() {
+        return stringOne;
+    }
+
+    // {{ String type
+    private String stringOne;
+
+    public String getStringClassOne() {
+        return stringOne;
+    }
+
+    public void setStringClassOne(final String string) {
+        this.stringOne = string;
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
new file mode 100755
index 0000000..a208ec2
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
@@ -0,0 +1,44 @@
+/*
+ *  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.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ * 
+ */
+public class StringBaseEntitySubThree extends StringBaseEntitySubTwo {
+
+    // {{ String type
+    private String string;
+
+    public String getStringClassThree() {
+        return string;
+    }
+
+    public void setStringClassThree(final String string) {
+        this.string = string;
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
new file mode 100755
index 0000000..7ffd40b
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
@@ -0,0 +1,48 @@
+/*
+ *  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.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ * 
+ */
+public class StringBaseEntitySubTwo extends StringBaseEntity {
+    
+    @Override
+    public String title() {
+        return stringClassTwo;
+    }
+
+    // {{ String type
+    private String stringClassTwo;
+
+    public String getStringClassTwo() {
+        return stringClassTwo;
+    }
+
+    public void setStringClassTwo(final String string) {
+        this.stringClassTwo = string;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
new file mode 100755
index 0000000..b3f502f
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
@@ -0,0 +1,24 @@
+/*
+ *  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.core.tck.dom.poly;
+
+public interface Stringable {
+    public String getString();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
new file mode 100644
index 0000000..a3d2b13
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
@@ -0,0 +1,41 @@
+/*
+ *  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.core.tck.dom.poly;
+
+
+public class StringableEntityWithOwnDerivedProperty implements Stringable {
+    
+    // {{ String
+    private String string;
+
+    @Override
+    public String getString() {
+        return string;
+    }
+
+    public void setString(final String string) {
+        this.string = string;
+    }
+    // }}
+
+    public String getSpecial() {
+        return "special";
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
new file mode 100755
index 0000000..41a11ea
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
@@ -0,0 +1,71 @@
+/*
+ *  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.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+
+public class StringableEntityWithOwnProperties extends AbstractDomainObject implements Stringable, Empty {
+    
+    public String title() {
+        return string;
+    }
+
+    // {{ String type
+    private String string;
+
+    @Override
+    public String getString() {
+        return string;
+    }
+
+    public void setString(final String string) {
+        this.string = string;
+    }
+
+    // }}
+
+    // {{ Special
+    private String special;
+
+    public String getSpecial() {
+        return special;
+    }
+
+    public void setSpecial(final String special) {
+        this.special = special;
+    }
+
+    // }}
+
+    // {{ Integer
+    private Integer integerValue;
+
+    @MemberOrder(sequence = "1")
+    public Integer getInteger() {
+        return integerValue;
+    }
+
+    public void setInteger(final Integer integerValue) {
+        this.integerValue = integerValue;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
new file mode 100755
index 0000000..460f521
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
@@ -0,0 +1,51 @@
+/*
+ *  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.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+public class StringableEntityWithOwnProperty extends AbstractDomainObject implements Stringable {
+
+    public String title() {
+        return string;
+    }
+
+    // {{ String type
+    private String string;
+    @Override
+    public String getString() {
+        return string;
+    }
+    public void setString(final String string) {
+        this.string = string;
+    }
+    // }}
+
+    // {{ Special
+    private String special;
+    public String getSpecial() {
+        return special;
+    }
+    public void setSpecial(final String special) {
+        this.special = special;
+    }
+    // }}
+
+}