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 2020/07/01 06:04:51 UTC

[isis] 06/06: ISIS-2222: further improves primitive boolean demo

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

danhaywood pushed a commit to branch ISIS-2222
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 75a38994c19db7baec2492057367a675ab20ee15
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jul 1 07:01:12 2020 +0100

    ISIS-2222: further improves primitive boolean demo
---
 .../booleans/PrimitiveBooleans-description.adoc    | 22 +++++----
 .../primitive/booleans/PrimitiveBooleans.java      | 10 ++--
 .../booleans/holder/PrimitiveBooleanHolder.java    | 20 --------
 ...eanHolder.java => PrimitiveBooleanHolder2.java} | 35 +-------------
 ...n.adoc => PrimitiveBooleanJdo-description.adoc} |  2 +-
 ...leanJdoEntity.java => PrimitiveBooleanJdo.java} |  7 +--
 ...y.layout.xml => PrimitiveBooleanJdo.layout.xml} |  0
 .../booleans/jdo/PrimitiveBooleanJdoEntities.java  |  8 ++--
 ...ce.java => PrimitiveBooleanJdoSeedService.java} |  4 +-
 .../vm/PrimitiveBooleanViewModel.layout.xml        | 53 ----------------------
 ...on.adoc => PrimitiveBooleanVm-description.adoc} |  2 +-
 ...oleanViewModel.java => PrimitiveBooleanVm.java} |  7 +--
 .../PrimitiveBooleanVm.layout.xml}                 |  0
 13 files changed, 34 insertions(+), 136 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/PrimitiveBooleans-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/PrimitiveBooleans-description.adoc
index f5d5b85..b4c3637 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/PrimitiveBooleans-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/PrimitiveBooleans-description.adoc
@@ -16,6 +16,13 @@ These objects both implement a common interface, `PrimitiveBooleanHolder`:
 include::holder/PrimitiveBooleanHolder.java[tags=class]
 ----
 
+There is also an extension of this interface, `PrimitiveBooleanHolder2`, with default methods demonstrating the use of label positions:
+
+[source,java]
+----
+include::holder/PrimitiveBooleanHolder2.java[tags=class]
+----
+
 The default methods have annotations that automatically inherited.
 Using `@MemberOrder` positions the properties into the appropriate `<field-set>` within the `Xxx.layout.xml` layout file.
 
@@ -25,14 +32,12 @@ Using `@MemberOrder` positions the properties into the appropriate `<field-set>`
 A number of mixin actions contribute through this interface, demonstrate the use of `boolean` as a parameter and as a return type.
 For example:
 
-* the `updateReadOnlyPropertyPromptStyleInline` action is:
+* the `updateReadOnlyProperty` action is:
 +
 [source,java]
 ----
-include::holder/PrimitiveBooleanHolder_updateReadOnlyPropertyPromptStyleInline.java[tags=class]
+include::holder/PrimitiveBooleanHolder_updateReadOnlyProperty.java[tags=class]
 ----
-+
-There are a number of variants of this action, to demonstrate different prompt layouts.
 
 * the `actionReturning` action is:
 +
@@ -43,15 +48,12 @@ include::holder/PrimitiveBooleanHolder_actionReturning.java[tags=class]
 
 == Mixin properties
 
-We also use the interface to contribute a number of mixin properties:
+We also use the interface to contribute a mixin property:
 
-* the `mixinPropertyWithCssClass` property:
+* the `mixinProperty` property:
 +
 [source,java]
 ----
-include::holder/PrimitiveBooleanHolder_mixinPropertyWithCssClass.java[tags=class]
+include::holder/PrimitiveBooleanHolder_mixinProperty.java[tags=class]
 ----
-+
-TIP: the styling is provided from the `application.css` static resource.
-
 
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/PrimitiveBooleans.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/PrimitiveBooleans.java
index 449cae5..ecf86cb 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/PrimitiveBooleans.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/PrimitiveBooleans.java
@@ -40,8 +40,8 @@ import lombok.extern.log4j.Log4j2;
 
 import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
 import demoapp.dom.types.primitive.booleans.jdo.PrimitiveBooleanJdoEntities;
-import demoapp.dom.types.primitive.booleans.jdo.PrimitiveBooleanJdoEntity;
-import demoapp.dom.types.primitive.booleans.vm.PrimitiveBooleanViewModel;
+import demoapp.dom.types.primitive.booleans.jdo.PrimitiveBooleanJdo;
+import demoapp.dom.types.primitive.booleans.vm.PrimitiveBooleanVm;
 
 @XmlRootElement(name = "Demo")
 @XmlType
@@ -56,15 +56,15 @@ public class PrimitiveBooleans implements HasAsciiDocDescription {
 
     @Action(semantics = SemanticsOf.SAFE)
     @ActionLayout(promptStyle = PromptStyle.DIALOG_MODAL)
-    public PrimitiveBooleanViewModel openViewModel(boolean initialValue) {
-        return new PrimitiveBooleanViewModel(initialValue);
+    public PrimitiveBooleanVm openViewModel(boolean initialValue) {
+        return new PrimitiveBooleanVm(initialValue);
     }
     public boolean default0OpenViewModel() {
         return true;
     }
 
     @Collection
-    public List<PrimitiveBooleanJdoEntity> getEntities() {
+    public List<PrimitiveBooleanJdo> getEntities() {
         return entities.all();
     }
 
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder.java
index f25c946..f4a20ed 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder.java
@@ -60,25 +60,5 @@ public interface PrimitiveBooleanHolder {
     boolean isReadWriteProperty();
     void setReadWriteProperty(boolean c);
 
-    @MemberOrder(name = "label-positions", sequence = "1")
-    @Property
-    @PropertyLayout(labelPosition = LabelPosition.LEFT, describedAs = "labelPosition=LEFT", hidden = Where.ALL_TABLES)
-    default boolean isReadOnlyPropertyDerivedLabelPositionLeft() { return isReadOnlyProperty(); }
-
-    @MemberOrder(name = "label-positions", sequence = "2")
-    @Property
-    @PropertyLayout(labelPosition = LabelPosition.TOP, describedAs = "labelPosition=TOP", hidden = Where.ALL_TABLES)
-    default boolean isReadOnlyPropertyDerivedLabelPositionTop() { return isReadOnlyProperty(); }
-
-    @MemberOrder(name = "label-positions", sequence = "3")
-    @Property
-    @PropertyLayout(labelPosition = LabelPosition.RIGHT, describedAs = "labelPosition=RIGHT", hidden = Where.ALL_TABLES)
-    default boolean isReadOnlyPropertyDerivedLabelPositionRight() { return isReadOnlyProperty(); }
-
-    @MemberOrder(name = "label-positions", sequence = "4")
-    @Property
-    @PropertyLayout(labelPosition = LabelPosition.NONE, describedAs = "labelPosition=NONE", hidden = Where.ALL_TABLES)
-    default boolean isReadOnlyPropertyDerivedLabelPositionNone() { return isReadOnlyProperty(); }
-
 }
 //end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder2.java
similarity index 66%
copy from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder.java
copy to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder2.java
index f25c946..6ce4c8f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder2.java
@@ -18,47 +18,14 @@
  */
 package demoapp.dom.types.primitive.booleans.holder;
 
-import javax.jdo.annotations.DatastoreIdentity;
-import javax.jdo.annotations.IdGeneratorStrategy;
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.PersistenceCapable;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.Bounding;
-import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.Editing;
 import org.apache.isis.applib.annotation.LabelPosition;
 import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Property;
 import org.apache.isis.applib.annotation.PropertyLayout;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.annotation.Title;
 import org.apache.isis.applib.annotation.Where;
 
-import lombok.Getter;
-import lombok.Setter;
-import lombok.extern.log4j.Log4j2;
-
-import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
-
-//tag::class[]
-public interface PrimitiveBooleanHolder {
-
-//end::class[]
-    @MemberOrder(name = "read-only-properties", sequence = "1") // TODO: doesn't seem to get picked up
-    @Property
-    @PropertyLayout
-//tag::class[]
-    boolean isReadOnlyProperty();
-    void setReadOnlyProperty(boolean c);
-
-//end::class[]
-    @MemberOrder(name = "editable-properties", sequence = "1") // TODO: doesn't seem to get picked up
-    @Property
-    @PropertyLayout
 //tag::class[]
-    boolean isReadWriteProperty();
-    void setReadWriteProperty(boolean c);
+public interface PrimitiveBooleanHolder2 extends PrimitiveBooleanHolder {
 
     @MemberOrder(name = "label-positions", sequence = "1")
     @Property
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdo-description.adoc
similarity index 67%
rename from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity-description.adoc
rename to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdo-description.adoc
index 93e57f7..d7b0aee 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdo-description.adoc
@@ -3,7 +3,7 @@ JDO package demoapp.dom.types.primitive.booleans
 
 [source,java]
 ----
-include::PrimitiveBooleanJdoEntity.java[tags="class"]
+include::PrimitiveBooleanJdo.java[tags="class"]
 ----
 <.> a no-arg constructor is introduced by JDO enhancer
 <.> no additional annotations required.
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdo.java
similarity index 92%
rename from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity.java
rename to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdo.java
index e693432..f9c4fd5 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdo.java
@@ -36,6 +36,7 @@ import lombok.Setter;
 
 import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
 import demoapp.dom.types.primitive.booleans.holder.PrimitiveBooleanHolder;
+import demoapp.dom.types.primitive.booleans.holder.PrimitiveBooleanHolder2;
 
 //tag::class[]
 @PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
@@ -43,11 +44,11 @@ import demoapp.dom.types.primitive.booleans.holder.PrimitiveBooleanHolder;
 @DomainObject(
         objectType = "demo.PrimitiveBooleanJdoEntity"
 )
-public class PrimitiveBooleanJdoEntity                                  // <.>
-        implements HasAsciiDocDescription, PrimitiveBooleanHolder {
+public class PrimitiveBooleanJdo                                  // <.>
+        implements HasAsciiDocDescription, PrimitiveBooleanHolder2 {
 
 //end::class[]
-    public PrimitiveBooleanJdoEntity(boolean initialValue) {
+    public PrimitiveBooleanJdo(boolean initialValue) {
         this.readOnlyProperty = initialValue;
         this.readWriteProperty = initialValue;
     }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdo.layout.xml
similarity index 100%
copy from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity.layout.xml
copy to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdo.layout.xml
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntities.java
index 731e6b6..33f4c86 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntities.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntities.java
@@ -12,12 +12,12 @@ import org.apache.isis.applib.services.repository.RepositoryService;
 @Service
 public class PrimitiveBooleanJdoEntities {
 
-    public Optional<PrimitiveBooleanJdoEntity> find(final boolean readOnlyProperty) {
-        return repositoryService.firstMatch(PrimitiveBooleanJdoEntity.class, x -> x.isReadOnlyProperty() == readOnlyProperty);
+    public Optional<PrimitiveBooleanJdo> find(final boolean readOnlyProperty) {
+        return repositoryService.firstMatch(PrimitiveBooleanJdo.class, x -> x.isReadOnlyProperty() == readOnlyProperty);
     }
 
-    public List<PrimitiveBooleanJdoEntity> all() {
-        return repositoryService.allInstances(PrimitiveBooleanJdoEntity.class);
+    public List<PrimitiveBooleanJdo> all() {
+        return repositoryService.allInstances(PrimitiveBooleanJdo.class);
     }
 
     @Inject
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntitySeedService.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoSeedService.java
similarity index 91%
rename from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntitySeedService.java
rename to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoSeedService.java
index cef4f3a..2bd9b92 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntitySeedService.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoSeedService.java
@@ -13,7 +13,7 @@ import org.apache.isis.testing.fixtures.applib.fixturescripts.FixtureScript;
 import org.apache.isis.testing.fixtures.applib.fixturescripts.FixtureScripts;
 
 @Service
-public class PrimitiveBooleanJdoEntitySeedService {
+public class PrimitiveBooleanJdoSeedService {
 
     @EventListener(AppLifecycleEvent.class)
     public void onAppLifecycleEvent(AppLifecycleEvent event) {
@@ -31,7 +31,7 @@ public class PrimitiveBooleanJdoEntitySeedService {
         @Override
         protected void execute(ExecutionContext executionContext) {
             Stream.of(true,false)
-                    .map(PrimitiveBooleanJdoEntity::new)
+                    .map(PrimitiveBooleanJdo::new)
                     .forEach(repositoryService::persist);
         }
 
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel.layout.xml
deleted file mode 100644
index ffa55a8..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel.layout.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<bs3:grid
-        xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd   http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
-        xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3"
-        xmlns:cpt="http://isis.apache.org/applib/layout/component"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
-	<bs3:row>
-		<bs3:col span="10" unreferencedActions="true">
-			<cpt:domainObject />
-			<cpt:action id="actionReturning"/>
-			<cpt:action id="rebuildMetamodel"/>
-		</bs3:col>
-		<bs3:col span="2">
-			<cpt:fieldSet name="" id="sources" />
-		</bs3:col>
-	</bs3:row>
-
-	<bs3:row>
-		<bs3:col span="6">
-			<cpt:fieldSet name="Action Prompt Styles" id="action-prompt-styles">
-				<cpt:property id="readOnlyProperty" />
-				<cpt:property id="readOnlyProperty2" >
-					<cpt:describedAs>
-						Associated action uses promptStyle=INLINE_AS_IF_EDIT
-					</cpt:describedAs>
-				</cpt:property>
-			</cpt:fieldSet>
-			<cpt:fieldSet name="Editable Properties" id="editable-properties">
-				<cpt:property id="readWriteProperty" />
-			</cpt:fieldSet>
-			<cpt:fieldSet name="Label Positions" id="label-positions"/>
-			<cpt:fieldSet name="Contributed by Mixins" id="contributed"/>
-			<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
-		</bs3:col>
-		<bs3:col span="6">
-			<cpt:fieldSet name="Description" id="description" >
-				<cpt:action id="clearHints" position="PANEL" />
-				<cpt:action id="downloadLayoutXml"  position="PANEL_DROPDOWN"/>
-				<cpt:action id="rebuildMetamodel"  position="PANEL"/>
-				<cpt:action id="downloadMetamodelXml"  position="PANEL_DROPDOWN"/>
-				<cpt:action id="inspectMetamodel"  position="PANEL_DROPDOWN"/>
-				<cpt:action id="downloadJdoMetadata"  position="PANEL_DROPDOWN"/>
-				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
-				<cpt:property id="description"/>
-			</cpt:fieldSet>
-		</bs3:col>
-	</bs3:row>
-	<bs3:row>
-		<bs3:col span="12" unreferencedCollections="true"/>
-	</bs3:row>
-
-</bs3:grid>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanVm-description.adoc
similarity index 61%
rename from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel-description.adoc
rename to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanVm-description.adoc
index 451236f..344559c 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanVm-description.adoc
@@ -2,7 +2,7 @@ JAXB supports `boolean` out-of-the-box, so no special annotations are required.
 
 [source,java]
 ----
-include::PrimitiveBooleanViewModel.java[tags="class"]
+include::PrimitiveBooleanVm.java[tags="class"]
 ----
 <.> a no-arg constructor is required by JAXB
 <.> no additional annotations required.
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanVm.java
similarity index 93%
rename from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel.java
rename to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanVm.java
index c770159..0b20866 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanViewModel.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanVm.java
@@ -37,6 +37,7 @@ import lombok.Setter;
 
 import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
 import demoapp.dom.types.primitive.booleans.holder.PrimitiveBooleanHolder;
+import demoapp.dom.types.primitive.booleans.holder.PrimitiveBooleanHolder2;
 
 //tag::class[]
 @XmlRootElement(name = "root")
@@ -47,11 +48,11 @@ import demoapp.dom.types.primitive.booleans.holder.PrimitiveBooleanHolder;
         objectType = "demo.PrimitiveBooleanViewModel"
 )
 @lombok.NoArgsConstructor                                           // <.>
-public class PrimitiveBooleanViewModel
-        implements HasAsciiDocDescription, PrimitiveBooleanHolder {
+public class PrimitiveBooleanVm
+        implements HasAsciiDocDescription, PrimitiveBooleanHolder2 {
 
 //end::class[]
-    public PrimitiveBooleanViewModel(boolean initialValue) {
+    public PrimitiveBooleanVm(boolean initialValue) {
         this.readOnlyProperty = initialValue;
         this.readWriteProperty = initialValue;
     }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanVm.layout.xml
similarity index 100%
rename from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/jdo/PrimitiveBooleanJdoEntity.layout.xml
rename to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/booleans/vm/PrimitiveBooleanVm.layout.xml