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 2017/10/06 08:35:42 UTC

[isis] 01/13: ISIS-1742: removes @NotPersistable annotation + supporting facets

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit e2921207e02816452af1cc5a7c0b07e310279c6f
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Oct 5 15:46:40 2017 +0300

    ISIS-1742: removes @NotPersistable annotation + supporting facets
---
 .../asciidoc/guides/rgant/_rgant_aaa_partial.adoc  | 19 -----
 .../isis/applib/annotation/NotPersistable.java     | 66 ---------------
 .../apache/isis/applib/marker/NonPersistable.java  | 30 -------
 .../apache/isis/applib/security/RoleMemento.java   |  2 -
 .../apache/isis/applib/security/UserMemento.java   |  2 -
 .../facets/fallback/FallbackFacetFactory.java      |  3 +-
 .../facets/fallback/NotPersistableFacetNull.java   | 46 ----------
 .../object/notpersistable/NotPersistableFacet.java | 36 --------
 .../NotPersistableFacetAbstract.java               | 37 --------
 .../notpersistable/NotPersistableFacetImpl.java    | 50 -----------
 .../NotPersistableFacetAnnotation.java             | 32 -------
 .../NotPersistableFacetAnnotationFactory.java      | 90 --------------------
 .../NotPersistableFacetMarkerInterface.java        | 32 -------
 .../NotPersistableFacetMarkerInterfaceFactory.java | 90 --------------------
 .../update/PropertySetAndClearFacetFactory.java    |  1 -
 .../core/metamodel/spec/ObjectSpecification.java   |  9 --
 .../isis/core/metamodel/spec/Persistability.java   | 54 ------------
 .../specimpl/ObjectSpecificationAbstract.java      | 26 ------
 .../specimpl/dflt/ObjectSpecificationDefault.java  |  1 -
 .../dflt/ProgrammingModelFacetsJava5.java          |  5 --
 .../NotPersistableFacetAnnotationFactoryTest.java  | 98 ----------------------
 ...PersistableMarkerInterfaceFacetFactoryTest.java | 80 ------------------
 .../ObjectReflectorDefaultTest_object.java         |  2 -
 .../testspec/ObjectSpecificationStub.java          | 14 ----
 .../fixturedomainservice/ObjectFixtureService.java | 10 +--
 .../system/persistence/PersistenceSession.java     |  5 +-
 .../system/JavaObjectMarkedAsTransient.java        | 26 ------
 .../domainobjects/DomainObjectReprRenderer.java    |  4 -
 todo-deprecation-list.txt                          | 23 ++++-
 29 files changed, 26 insertions(+), 867 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_partial.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_partial.adoc
index ee0c0f6..6b66307 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_partial.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_partial.adoc
@@ -33,25 +33,6 @@ For these reasons the `@Encodable` annotation is generally never applied directl
 Currently neither the Wicket viewer nor the RO viewer use this API.  The Wicket viewer uses Wicket APIs, while RO viewer has its own mechanisms (parsing data from input JSON representations, etc.)
 |Persistence
 
-|`@NotPersistable`
-|Indicates that a domain object may not be programmatically persisted. +
-+
-This annotation  indicates that transient instances of this class may be created but may not be persisted. The framework will not provide the user with an option to 'save' the object, and attempting to persist such an object programmatically would be an error.
-
-For example:
-
-[source,java]
-----
-@NotPersistable(By.USER)
-public class InputForm {
-    ...
-}
-----
-
-By default the annotated object is effectively transient (ie default to `By.USER_OR_PROGRAM`).
-
-This annotation is not supported by: Wicket viewer (which does not support transient objects).  See also link:https://issues.apache.org/jira/browse/ISIS-743[ISIS-743] contemplating the removal of this annotation.
-|Domain, Persistence
 
 |`@Parseable`
 |Indicates that a (value) class can be reconstructed from a string. +
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/NotPersistable.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/NotPersistable.java
deleted file mode 100644
index 83d5225..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/NotPersistable.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.isis.applib.marker.NonPersistable;
-import org.apache.isis.applib.marker.ProgramPersistable;
-import org.apache.isis.applib.util.Enums;
-
-/**
- * No longer supported - the MetaModel validator will reject any domain classes annotated with this annotation.
- *
- * @deprecated
- */
-@Deprecated
-@Inherited
-@Target({ ElementType.TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface NotPersistable {
-
-    public enum By {
-        USER, 
-        USER_OR_PROGRAM;
-        
-        public static By lookupForMarkerInterface(final Class<?> cls) {
-            if(cls.isInterface()) {
-                return null;
-            }
-            if (ProgramPersistable.class.isAssignableFrom(cls)) {
-                return USER;
-            } else if (NonPersistable.class.isAssignableFrom(cls)) {
-                return USER_OR_PROGRAM;
-            }
-            return null;
-        }
-        
-        public String getFriendlyName() {
-            return Enums.getFriendlyNameOf(this);
-        }
-    }
-
-    By value() default By.USER_OR_PROGRAM;
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/marker/NonPersistable.java b/core/applib/src/main/java/org/apache/isis/applib/marker/NonPersistable.java
deleted file mode 100644
index 1b53b64..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/marker/NonPersistable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.marker;
-
-/**
- * No longer supported - the MetaModel validator will reject any domain classes that implement this marker interface.
- *
- * @deprecated
- */
-@Deprecated
-public interface NonPersistable {
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/security/RoleMemento.java b/core/applib/src/main/java/org/apache/isis/applib/security/RoleMemento.java
index 21a25f6..f9802fd 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/security/RoleMemento.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/security/RoleMemento.java
@@ -20,9 +20,7 @@
 package org.apache.isis.applib.security;
 
 import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.NotPersistable;
 
-@NotPersistable
 public final class RoleMemento {
 
     /**
diff --git a/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java b/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java
index 70876e3..489181f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java
@@ -24,13 +24,11 @@ import java.util.Arrays;
 import java.util.List;
 
 import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.NotPersistable;
 
 /**
  * Details, obtained from the container, about the user and his roles.
  * Read-only.
  */
-@NotPersistable
 public final class UserMemento {
 
     //region > constructors
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/fallback/FallbackFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/fallback/FallbackFacetFactory.java
index dde4d3c..ac4d3a9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/fallback/FallbackFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/fallback/FallbackFacetFactory.java
@@ -75,7 +75,6 @@ public class FallbackFacetFactory extends FacetFactoryAbstract {
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
 
         final DescribedAsFacetNone describedAsFacet = new DescribedAsFacetNone(facetHolder);
-        final NotPersistableFacetNull notPersistableFacet = new NotPersistableFacetNull(facetHolder);
         final TitleFacetNone titleFacet = new TitleFacetNone(facetHolder);
 
         final int pagedStandalone = getPagedConfigSetting("standalone", PAGE_SIZE_STANDALONE_DEFAULT);
@@ -84,7 +83,7 @@ public class FallbackFacetFactory extends FacetFactoryAbstract {
         final Facet[] facets = new Facet[] { describedAsFacet,
                 // commenting these out, think this whole isNoop business is a little bogus
                 // new ImmutableFacetNever(holder),
-                notPersistableFacet, titleFacet, pagedFacet};
+                titleFacet, pagedFacet};
         FacetUtil.addFacets(facets);
     }
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/fallback/NotPersistableFacetNull.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/fallback/NotPersistableFacetNull.java
deleted file mode 100644
index ef3ddc6..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/fallback/NotPersistableFacetNull.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.fallback;
-
-import org.apache.isis.applib.events.UsabilityEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacet;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacetAbstract;
-import org.apache.isis.core.metamodel.interactions.UsabilityContext;
-
-/**
- * Installed by the {@link org.apache.isis.core.metamodel.facets.fallback.FallbackFacetFactory}, and means that this class
- * <i>is</i> persistable (ie not {@link NotPersistableFacet not persistable}).
- */
-public class NotPersistableFacetNull extends NotPersistableFacetAbstract {
-
-    public NotPersistableFacetNull(final FacetHolder holder) {
-        super(null, holder);
-    }
-
-    /**
-     * Always returns <tt>null</tt> (that is, does <i>not</i> disable).
-     */
-    @Override
-    public String disables(final UsabilityContext<? extends UsabilityEvent> ic) {
-        return null;
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacet.java
deleted file mode 100644
index 86501e1..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacet.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.core.metamodel.facets.SingleValueFacet;
-import org.apache.isis.core.metamodel.interactions.DisablingInteractionAdvisor;
-
-/**
- * Indicates that the instances of this class are not persistable either by the
- * user (through the viewer) or at all (either by the user or programmatically).
- * 
- * <p>
- * In the standard Apache Isis Programming Model, typically corresponds to
- * applying the <tt>@NotPersistable</tt> annotation at the class level.
- */
-public interface NotPersistableFacet extends SingleValueFacet<NotPersistable.By>, DisablingInteractionAdvisor {
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetAbstract.java
deleted file mode 100644
index 3c98c1e..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetAbstract.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.SingleValueFacetAbstract;
-
-public abstract class NotPersistableFacetAbstract extends SingleValueFacetAbstract<NotPersistable.By> implements NotPersistableFacet {
-
-    public static Class<? extends Facet> type() {
-        return NotPersistableFacet.class;
-    }
-
-    public NotPersistableFacetAbstract(final NotPersistable.By value, final FacetHolder holder) {
-        super(type(), value, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetImpl.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetImpl.java
deleted file mode 100644
index 0dc8be8..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.applib.events.UsabilityEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.interactions.UsabilityContext;
-
-public class NotPersistableFacetImpl extends NotPersistableFacetAbstract {
-
-    public NotPersistableFacetImpl(final NotPersistable.By value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-    @Override
-    public String disables(final UsabilityContext<? extends UsabilityEvent> ic) {
-        final NotPersistable.By initiatedBy = value();
-        if (initiatedBy == NotPersistable.By.USER_OR_PROGRAM) {
-            // never persistable
-            return "Not persistable";
-        } else {
-            if (ic.isFrameworkInitiated()) {
-                // enabled only in this case
-                return null;
-            } else {
-                // not programmatic, ie by user, so disabled
-                return "Not persistable";
-            }
-        }
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistableannot/NotPersistableFacetAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistableannot/NotPersistableFacetAnnotation.java
deleted file mode 100644
index ee8601b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistableannot/NotPersistableFacetAnnotation.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistableannot;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacetImpl;
-
-public class NotPersistableFacetAnnotation extends NotPersistableFacetImpl {
-
-    public NotPersistableFacetAnnotation(final NotPersistable.By value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistableannot/NotPersistableFacetAnnotationFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistableannot/NotPersistableFacetAnnotationFactory.java
deleted file mode 100644
index a4cfce6..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistableannot/NotPersistableFacetAnnotationFactory.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistableannot;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facetapi.MetaModelValidatorRefiner;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacet;
-import org.apache.isis.core.metamodel.progmodel.DeprecatedMarker;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorVisiting;
-import org.apache.isis.core.metamodel.specloader.validator.ValidationFailures;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class NotPersistableFacetAnnotationFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner, DeprecatedMarker {
-
-    public NotPersistableFacetAnnotationFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessClassContext processClassContaxt) {
-        final NotPersistable annotation = Annotations.getAnnotation(processClassContaxt.getCls(), NotPersistable.class);
-        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
-    }
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-        final NotPersistable annotation = Annotations.getAnnotation(processMethodContext.getMethod(), NotPersistable.class);
-        FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
-    }
-
-    private NotPersistableFacet create(final NotPersistable annotation, final FacetHolder holder) {
-        return annotation != null ? new NotPersistableFacetAnnotation(annotation.value(), holder) : null;
-    }
-
-    @Override
-    public void refineMetaModelValidator(
-            final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
-        metaModelValidator.add(new MetaModelValidatorVisiting(newValidatorVisitor()));
-    }
-
-    private MetaModelValidatorVisiting.Visitor newValidatorVisitor() {
-        return new MetaModelValidatorVisiting.Visitor() {
-            @Override
-            public boolean visit(
-                    final ObjectSpecification objectSpec,
-                    final ValidationFailures validationFailures) {
-
-                if (objectSpec.containsDoOpFacet(NotPersistableFacet.class)) {
-                    final NotPersistableFacet notPersistableFacet = objectSpec.getFacet(NotPersistableFacet.class);
-                    if(notPersistableFacet instanceof NotPersistableFacetAnnotation) {
-                        final Class<?> type = NotPersistable.class;
-                        validationFailures.add(String.format(
-                                "%s is annotated with %s; this annotation is no longer supported",
-                                objectSpec.getFullIdentifier(), type.getSimpleName()));
-                    }
-                }
-                return true;
-            }
-        };
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistablemarkerifc/NotPersistableFacetMarkerInterface.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistablemarkerifc/NotPersistableFacetMarkerInterface.java
deleted file mode 100644
index f31bf69..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistablemarkerifc/NotPersistableFacetMarkerInterface.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistablemarkerifc;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacetImpl;
-
-public class NotPersistableFacetMarkerInterface extends NotPersistableFacetImpl {
-
-    public NotPersistableFacetMarkerInterface(final NotPersistable.By value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistablemarkerifc/NotPersistableFacetMarkerInterfaceFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistablemarkerifc/NotPersistableFacetMarkerInterfaceFactory.java
deleted file mode 100644
index a49f555..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/notpersistable/notpersistablemarkerifc/NotPersistableFacetMarkerInterfaceFactory.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistablemarkerifc;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.applib.marker.NonPersistable;
-import org.apache.isis.applib.marker.ProgramPersistable;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facetapi.MetaModelValidatorRefiner;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacet;
-import org.apache.isis.core.metamodel.progmodel.DeprecatedMarker;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorVisiting;
-import org.apache.isis.core.metamodel.specloader.validator.ValidationFailures;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class NotPersistableFacetMarkerInterfaceFactory extends FacetFactoryAbstract implements
-        MetaModelValidatorRefiner, DeprecatedMarker {
-
-    public NotPersistableFacetMarkerInterfaceFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessClassContext processClassContext) {
-        final NotPersistable.By initiatedBy = NotPersistable.By.lookupForMarkerInterface(processClassContext.getCls());
-        FacetUtil.addFacet(create(initiatedBy, processClassContext.getFacetHolder()));
-    }
-
-    private NotPersistableFacet create(final NotPersistable.By initiatedBy, final FacetHolder holder) {
-        return initiatedBy != null ? new NotPersistableFacetMarkerInterface(initiatedBy, holder) : null;
-    }
-
-    @Override
-    public void refineMetaModelValidator(
-            final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
-        metaModelValidator.add(new MetaModelValidatorVisiting(newValidatorVisitor()));
-    }
-
-    private MetaModelValidatorVisiting.Visitor newValidatorVisitor() {
-        return new MetaModelValidatorVisiting.Visitor() {
-            @Override
-            public boolean visit(
-                    final ObjectSpecification objectSpec,
-                    final ValidationFailures validationFailures) {
-
-                if (objectSpec.containsDoOpFacet(NotPersistableFacet.class)) {
-                    final NotPersistableFacet notPersistableFacet = objectSpec.getFacet(NotPersistableFacet.class);
-                    if(notPersistableFacet instanceof NotPersistableFacetMarkerInterface) {
-                        final NotPersistable.By by = ((NotPersistableFacetMarkerInterface) notPersistableFacet).value();
-                        final Class<?> type =
-                                by == NotPersistable.By.USER
-                                    ? ProgramPersistable.class
-                                    : NonPersistable.class;
-                        validationFailures.add(String.format(
-                                "%s implements %s; this interface is no longer supported",
-                                objectSpec.getFullIdentifier(), type.getSimpleName()));
-                    }
-                }
-                return true;
-            }
-        };
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/PropertySetAndClearFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/PropertySetAndClearFacetFactory.java
index 9c2d997..559004d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/PropertySetAndClearFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/update/PropertySetAndClearFacetFactory.java
@@ -28,7 +28,6 @@ import org.apache.isis.core.metamodel.facets.MethodFinderUtils;
 import org.apache.isis.core.metamodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.MethodPrefixConstants;
 import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacet;
 import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacetViaClearMethod;
 import org.apache.isis.core.metamodel.facets.properties.update.clear.PropertyClearFacetViaSetterMethod;
 import org.apache.isis.core.metamodel.facets.properties.update.init.PropertyInitializationFacetViaSetterMethod;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java
index 29e6bb7..f2dea29 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java
@@ -248,15 +248,6 @@ public interface ObjectSpecification extends Specification, ObjectActionContaine
     // Facets
     // //////////////////////////////////////////////////////////////
 
-    /**
-     * Determines if objects of this specification can be persisted or not. If
-     * it can be persisted (i.e. it return something other than
-     * {@link Persistability}.TRANSIENT ObjectAdapter.isPersistent() will
-     * indicated whether the object is persistent or not. If they cannot be
-     * persisted then {@link ObjectAdapter}. {@link #persistability()} should be
-     * ignored.
-     */
-    Persistability persistability();
 
     /**
      * Determines if the object represents an value or object.
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Persistability.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Persistability.java
deleted file mode 100644
index 72143cc..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Persistability.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.spec;
-
-public enum Persistability {
-    /**
-     * Marks a class as being persistable, but only by under application program
-     * control.
-     */
-    PROGRAM_PERSISTABLE("Program Persistable", true),
-    /**
-     * Marks a class as transient - such an object cannot be persisted.
-     */
-    TRANSIENT("Transient", false),
-    /**
-     * Marks a class as being persistable by the user (or under application
-     * program control).
-     */
-    USER_PERSISTABLE("User Persistable", true);
-
-    private final String name;
-    private final boolean persistable;
-
-    private Persistability(final String name, final boolean persistable) {
-        this.name = name;
-        this.persistable = persistable;
-    }
-
-    public boolean isPersistable() {
-        return persistable;
-    }
-
-    @Override
-    public String toString() {
-        return name;
-    }
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
index b705c89..0d50f87 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
@@ -38,7 +38,6 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.isis.applib.AppManifest;
 import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.annotation.NotPersistable;
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.filter.Filter;
@@ -69,7 +68,6 @@ import org.apache.isis.core.metamodel.facets.object.icon.IconFacet;
 import org.apache.isis.core.metamodel.facets.object.immutable.ImmutableFacet;
 import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
 import org.apache.isis.core.metamodel.facets.object.mixin.MixinFacet;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacet;
 import org.apache.isis.core.metamodel.facets.object.objectspecid.ObjectSpecIdFacet;
 import org.apache.isis.core.metamodel.facets.object.parented.ParentedCollectionFacet;
 import org.apache.isis.core.metamodel.facets.object.parseable.ParseableFacet;
@@ -86,7 +84,6 @@ import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.ObjectSpecificationException;
-import org.apache.isis.core.metamodel.spec.Persistability;
 import org.apache.isis.core.metamodel.spec.feature.Contributed;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
@@ -163,8 +160,6 @@ public abstract class ObjectSpecificationAbstract extends FacetHolderImpl implem
 
     private ObjectSpecification superclassSpec;
 
-    private Persistability persistability = Persistability.USER_PERSISTABLE;
-
     private TitleFacet titleFacet;
     private IconFacet iconFacet;
     private CssClassFacet cssClassFacet;
@@ -356,24 +351,8 @@ public abstract class ObjectSpecificationAbstract extends FacetHolderImpl implem
         titleFacet = getFacet(TitleFacet.class);
         iconFacet = getFacet(IconFacet.class);
         cssClassFacet = getFacet(CssClassFacet.class);
-
-        this.persistability = determinePersistability();
     }
 
-    private Persistability determinePersistability() {
-        final NotPersistableFacet notPersistableFacet = getFacet(NotPersistableFacet.class);
-        if (notPersistableFacet == null) {
-            return Persistability.USER_PERSISTABLE;
-        }
-        final NotPersistable.By initiatedBy = notPersistableFacet.value();
-        if (initiatedBy == NotPersistable.By.USER_OR_PROGRAM) {
-            return Persistability.TRANSIENT;
-        } else if (initiatedBy == NotPersistable.By.USER) {
-            return Persistability.PROGRAM_PERSISTABLE;
-        } else {
-            return Persistability.USER_PERSISTABLE;
-        }
-    }
 
     //endregion
 
@@ -499,11 +478,6 @@ public abstract class ObjectSpecificationAbstract extends FacetHolderImpl implem
         return helpFacet == null ? null : helpFacet.value();
     }
 
-    @Override
-    public Persistability persistability() {
-        return persistability;
-    }
-
 
     //endregion
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
index 4a3e275..7c298bc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
@@ -404,7 +404,6 @@ public class ObjectSpecificationDefault extends ObjectSpecificationAbstract impl
         final ToString str = new ToString(this);
         str.append("class", getFullIdentifier());
         str.append("type", (isParentedOrFreeCollection() ? "Collection" : "Object"));
-        str.append("persistable", persistability());
         str.append("superclass", superclass() == null ? "Object" : superclass().getFullIdentifier());
         return str.toString();
     }
diff --git a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
index cb592dd..ce3ee25 100644
--- a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
+++ b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
@@ -91,8 +91,6 @@ import org.apache.isis.core.metamodel.facets.object.immutable.immutableannot.Cop
 import org.apache.isis.core.metamodel.facets.object.immutable.immutablemarkerifc.ImmutableFacetMarkerInterfaceFactory;
 import org.apache.isis.core.metamodel.facets.object.membergroups.annotprop.MemberGroupLayoutFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.mixin.MixinFacetForMixinAnnotationFactory;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistableannot.NotPersistableFacetAnnotationFactory;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistablemarkerifc.NotPersistableFacetMarkerInterfaceFactory;
 import org.apache.isis.core.metamodel.facets.object.objectspecid.classname.ObjectSpecIdFacetDerivedFromClassNameFactory;
 import org.apache.isis.core.metamodel.facets.object.objectvalidprops.impl.ObjectValidPropertiesFacetImplFactory;
 import org.apache.isis.core.metamodel.facets.object.parseable.annotcfg.ParseableFacetAnnotationElseConfigurationFactory;
@@ -375,9 +373,6 @@ public final class ProgrammingModelFacetsJava5 extends ProgrammingModelAbstract
         addFactory(new ActionLayoutFacetFactory());
         addFactory(new CollectionLayoutFacetFactory());
 
-        addFactory(new NotPersistableFacetAnnotationFactory());
-        addFactory(new NotPersistableFacetMarkerInterfaceFactory());
-
         addFactory(new ParseableFacetAnnotationElseConfigurationFactory());
         
 
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetAnnotationFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetAnnotationFactoryTest.java
deleted file mode 100644
index 46e0422..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableFacetAnnotationFactoryTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.applib.annotation.NotPersistable.By;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
-import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistableannot.NotPersistableFacetAnnotation;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistableannot.NotPersistableFacetAnnotationFactory;
-
-public class NotPersistableFacetAnnotationFactoryTest extends AbstractFacetFactoryTest {
-
-    private NotPersistableFacetAnnotationFactory facetFactory;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        facetFactory = new NotPersistableFacetAnnotationFactory();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        facetFactory = null;
-        super.tearDown();
-    }
-
-    public void testNotPersistableAnnotationPickedUpOnClassAndDefaultsToUserOrProgram() {
-        @NotPersistable
-        class Customer {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
-
-        final Facet facet = facetedMethod.getFacet(NotPersistableFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof NotPersistableFacetAnnotation);
-        final NotPersistableFacetAnnotation notPersistableFacetAnnotation = (NotPersistableFacetAnnotation) facet;
-        final NotPersistable.By value = notPersistableFacetAnnotation.value();
-        assertEquals(NotPersistable.By.USER_OR_PROGRAM, value);
-
-        assertNoMethodsRemoved();
-    }
-
-    public void testNotPersistableAnnotationUserOrProgramPickedUpOn() {
-        @NotPersistable(By.USER_OR_PROGRAM)
-        class Customer {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
-
-        final Facet facet = facetedMethod.getFacet(NotPersistableFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof NotPersistableFacetAnnotation);
-        final NotPersistableFacetAnnotation notPersistableFacetAnnotation = (NotPersistableFacetAnnotation) facet;
-        final NotPersistable.By value = notPersistableFacetAnnotation.value();
-        assertEquals(NotPersistable.By.USER_OR_PROGRAM, value);
-
-        assertNoMethodsRemoved();
-    }
-
-    public void testNotPersistableAnnotationUserPickedUpOn() {
-        @NotPersistable(By.USER)
-        class Customer {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
-
-        final Facet facet = facetedMethod.getFacet(NotPersistableFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof NotPersistableFacetAnnotation);
-        final NotPersistableFacetAnnotation notPersistableFacetAnnotation = (NotPersistableFacetAnnotation) facet;
-        final NotPersistable.By value = notPersistableFacetAnnotation.value();
-        assertEquals(NotPersistable.By.USER, value);
-
-        assertNoMethodsRemoved();
-    }
-
-}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableMarkerInterfaceFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableMarkerInterfaceFacetFactoryTest.java
deleted file mode 100644
index e7aa9f3..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/notpersistable/NotPersistableMarkerInterfaceFacetFactoryTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.metamodel.facets.object.notpersistable;
-
-import org.apache.isis.applib.annotation.NotPersistable;
-import org.apache.isis.applib.marker.NonPersistable;
-import org.apache.isis.applib.marker.ProgramPersistable;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
-import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistablemarkerifc.NotPersistableFacetMarkerInterface;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistablemarkerifc.NotPersistableFacetMarkerInterfaceFactory;
-
-public class NotPersistableMarkerInterfaceFacetFactoryTest extends AbstractFacetFactoryTest {
-
-    private NotPersistableFacetMarkerInterfaceFactory facetFactory;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        facetFactory = new NotPersistableFacetMarkerInterfaceFactory();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        facetFactory = null;
-        super.tearDown();
-    }
-
-    public void testProgramPersistableMeansNotPersistableByUser() {
-        class Customer implements ProgramPersistable {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
-
-        final Facet facet = facetedMethod.getFacet(NotPersistableFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof NotPersistableFacetMarkerInterface);
-        final NotPersistableFacetMarkerInterface notPersistableFacetMarkerInterface = (NotPersistableFacetMarkerInterface) facet;
-        final NotPersistable.By value = notPersistableFacetMarkerInterface.value();
-        assertEquals(NotPersistable.By.USER, value);
-
-        assertNoMethodsRemoved();
-    }
-
-    public void testNotPersistable() {
-        class Customer implements NonPersistable {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
-
-        final Facet facet = facetedMethod.getFacet(NotPersistableFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof NotPersistableFacetMarkerInterface);
-        final NotPersistableFacetMarkerInterface notPersistableFacetMarkerInterface = (NotPersistableFacetMarkerInterface) facet;
-        final NotPersistable.By value = notPersistableFacetMarkerInterface.value();
-        assertEquals(NotPersistable.By.USER_OR_PROGRAM, value);
-
-        assertNoMethodsRemoved();
-    }
-
-}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefaultTest_object.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefaultTest_object.java
index 3c99d61..99b1d5b 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefaultTest_object.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefaultTest_object.java
@@ -28,7 +28,6 @@ import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
 import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacet;
 import org.apache.isis.core.metamodel.facets.object.objectvalidprops.ObjectValidPropertiesFacet;
 import org.apache.isis.core.metamodel.facets.object.plural.PluralFacet;
 import org.apache.isis.core.metamodel.facets.object.title.TitleFacet;
@@ -60,7 +59,6 @@ public class ObjectReflectorDefaultTest_object extends SpecificationLoaderTestAb
         Assert.assertNotNull(specification.getFacet(DescribedAsFacet.class));
         Assert.assertNotNull(specification.getFacet(TitleFacet.class));
         Assert.assertNotNull(specification.getFacet(PluralFacet.class));
-        Assert.assertNotNull(specification.getFacet(NotPersistableFacet.class));
         Assert.assertNotNull(specification.getFacet(ObjectValidPropertiesFacet.class));
     }
 
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java
index 8f0614a..36f1f0d 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java
@@ -45,7 +45,6 @@ import org.apache.isis.core.metamodel.services.configinternal.ConfigurationServi
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.Persistability;
 import org.apache.isis.core.metamodel.spec.feature.Contributed;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -64,8 +63,6 @@ public class ObjectSpecificationStub extends FacetHolderImpl implements ObjectSp
      */
     private ObjectSpecId specId;
 
-    private Persistability persistable;
-
     private ServicesInjector servicesInjector;
 
     public ObjectSpecificationStub(final Class<?> type) {
@@ -87,7 +84,6 @@ public class ObjectSpecificationStub extends FacetHolderImpl implements ObjectSp
     public ObjectSpecificationStub(final String name) {
         this.name = name;
         title = "";
-        persistable = Persistability.USER_PERSISTABLE;
     }
 
     @Override
@@ -292,11 +288,6 @@ public class ObjectSpecificationStub extends FacetHolderImpl implements ObjectSp
     }
 
     @Override
-    public Persistability persistability() {
-        return persistable;
-    }
-
-    @Override
     public List<ObjectSpecification> subclasses() {
         return subclasses;
     }
@@ -326,11 +317,6 @@ public class ObjectSpecificationStub extends FacetHolderImpl implements ObjectSp
         return Identifier.classIdentifier(name);
     }
 
-    // TODO: not used
-    public void setupPersistable(final Persistability persistable) {
-        this.persistable = persistable;
-    }
-
     @Override
     public boolean isParentedOrFreeCollection() {
         return false;
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureService.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureService.java
index 4e8b7a6a..c05cb27 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureService.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureService.java
@@ -28,7 +28,6 @@ import java.util.List;
 import java.util.Set;
 
 import javax.annotation.PostConstruct;
-import javax.inject.Inject;
 
 import com.google.common.collect.Sets;
 
@@ -49,7 +48,6 @@ import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.Persistability;
 import org.apache.isis.core.metamodel.spec.feature.Contributed;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
@@ -97,11 +95,9 @@ public class ObjectFixtureService {
     @MemberOrder(sequence = "1")
     public void save(final Object object) {
         final ObjectAdapter adapter = getPersistenceSession().adapterFor(object);
-        if (adapter.getSpecification().persistability() != Persistability.TRANSIENT) {
-            LOG.info("Saving object for fixture: " + adapter);
-            addObjectAndAssociates(adapter);
-            saveAll();
-        }
+        LOG.info("Saving object for fixture: " + adapter);
+        addObjectAndAssociates(adapter);
+        saveAll();
     }
 
     private void addObjectAndAssociates(final ObjectAdapter adapter) {
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
index 308508b..ca30d29 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
@@ -1077,9 +1077,6 @@ public class PersistenceSession implements
         if (adapter.representsPersistent()) {
             throw new NotPersistableException("Object already persistent: " + adapter);
         }
-        if (!adapter.getSpecification().persistability().isPersistable()) {
-            throw new NotPersistableException("Object is not persistable: " + adapter);
-        }
         final ObjectSpecification specification = adapter.getSpecification();
         if (specification.isService()) {
             throw new NotPersistableException("Cannot persist services: " + adapter);
@@ -1135,7 +1132,7 @@ public class PersistenceSession implements
 
 
     private static boolean objectSpecNotPersistable(final ObjectAdapter adapter) {
-        return !adapter.getSpecification().persistability().isPersistable() || adapter.isParentedCollection();
+        return adapter.isParentedCollection();
     }
 
 
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/JavaObjectMarkedAsTransient.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/JavaObjectMarkedAsTransient.java
deleted file mode 100644
index 1c00c7a..0000000
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/JavaObjectMarkedAsTransient.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.runtime.system;
-
-import org.apache.isis.applib.marker.NonPersistable;
-
-public class JavaObjectMarkedAsTransient implements NonPersistable {
-
-}
diff --git a/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/DomainObjectReprRenderer.java b/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/DomainObjectReprRenderer.java
index 883d5cd..5f9d8f9 100644
--- a/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/DomainObjectReprRenderer.java
+++ b/core/viewer-restfulobjects-rendering/src/main/java/org/apache/isis/viewer/restfulobjects/rendering/domainobjects/DomainObjectReprRenderer.java
@@ -22,7 +22,6 @@ import org.apache.isis.applib.annotation.DomainServiceLayout;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.facets.object.domainservicelayout.DomainServiceLayoutFacet;
-import org.apache.isis.core.metamodel.facets.object.notpersistable.NotPersistableFacet;
 import org.apache.isis.core.metamodel.facets.object.title.TitleFacet;
 import org.apache.isis.core.metamodel.services.ServiceUtil;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -355,9 +354,6 @@ public class DomainObjectReprRenderer extends ReprRendererAbstract<DomainObjectR
         if (objectAdapter.representsPersistent()) {
             return;
         }
-        if(objectAdapter.getSpecification().containsDoOpFacet(NotPersistableFacet.class)) {
-            return;
-        }
         final DomainObjectReprRenderer renderer =
                 new DomainObjectReprRenderer(getRendererContext(), null, JsonRepresentation.newMap());
         final JsonRepresentation domainObjectRepr = renderer.with(objectAdapter).asPersistLinkArguments().render();
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index 2e0a877..4b647dd 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -76,6 +76,19 @@ org.apache.isis.applib.annotation
     TypeOf.java - entire annotation, use @Collection(typeOf=...) or @Action(typeOf=...) instead.
 
 
+    NotPersistable.java - entire annotation, not supported and does nothing
+
+
+org.apache.isis.applib.marker
+
+    NotPersistable.java
+
+
+
+
+
+
+
 TO REMOVE:
 
 org.apache.isis.applib
@@ -93,7 +106,6 @@ org.apache.isis.applib.annotation
 
 
 
-    NotPersistable.java - entire annotation, not supported and does nothing
 
     AutoComplete.java - entire annotation, use @DomainObject(autoComplete...=...)
     Bookmarkable.java - entire annotation, use @DomainObjectLayout(bookmarking=...)
@@ -159,12 +171,14 @@ org.apache.isis.applib.fixturescripts
     FixtureScripts.java - remove deprecated methods;
                           framework provides an implementation of this service, and use FixtureScriptsSpecificatoinProvider to configure instead.
 
+
 org.apache.isis.applib.marker - remove these marker interaces (tend to use annotations in preference)
     ImmutableOncePersisted.java
     ImmutableUntilPersisted.java
     NeverImmutable.java
-    NonPersistable.java
     ProgramPersistable.java
+
+
 org.apache.isis.applib.services.actinvoc
     ActionInvocationContext.java -remove unused constructors
 
@@ -319,6 +333,10 @@ Also for 2.0.0, new features/deprecations:
 OTHER STUFF:
 
 
+debug() stuff
+
+ObjectFixtureService
+
 
 
 inline paraname8 from incode platform
@@ -357,3 +375,4 @@ update .xsd for layout, make render optional and deprecated.
 
 
 
+link:https://issues.apache.org/jira/browse/ISIS-743[ISIS-743] - @NotPersistable annotation

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.