You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2023/05/18 13:17:06 UTC
[causeway] branch master updated (cdbe02b864 -> ebbf7aa6ee)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
from cdbe02b864 Merge pull request #1664 from apache/dependabot/maven/master/com.vladsch.flexmark-flexmark-all-0.64.6
new 29c38b063e CAUSEWAY-2485: updates descriptions of primitive and wrapper types
new 95afe5ef6e CAUSEWAY-2485: wip, adds other data types for code gen to demo
new f0c45e80d3 CAUSEWAY-2485 : updates templates
new 1fe2ef1c50 CAUSEWAY-2485 : tooling fixes.
new dceff26881 CAUSEWAY-2485 : tooling fixes
new ab4af890a6 CAUSEWAY-2485 : updates templates
new 7de0468e9e CAUSEWAY-2485 : updates to templates for value type demo gen
new ebbf7aa6ee CAUSEWAY-2845: further fixes for demo showcase value type templates
The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/causeway/commons/io/FileUtils.java | 17 +
.../valuesemantics/BigDecimalValueSemantics.java | 8 +-
.../valuesemantics/BigIntegerValueSemantics.java | 9 +-
.../valuesemantics/URLValueSemantics.java | 5 +-
.../causeway/blobs/CausewayBlobs-description.adoc | 22 +-
.../markups/CausewayMarkups-description.adoc | 2 +-
.../asciidocs/CausewayAsciiDocs-description.adoc | 2 +-
.../markdowns/CausewayMarkdowns-description.adoc | 2 +-
.../vegas/CausewayVegas-description.adoc | 2 +-
.../booleans/WrapperBooleans-description.adoc | 2 +-
.../javalang/bytes/WrapperBytes-description.adoc | 2 +-
.../characters/WrapperCharacters-description.adoc | 2 +-
.../doubles/WrapperDoubles-description.adoc | 2 +-
.../javalang/enums/JavaLangEnums-description.adoc | 2 +-
.../javalang/floats/WrapperFloats-description.adoc | 2 +-
.../integers/WrapperIntegers-description.adoc | 2 +-
.../javalang/longs/WrapperLongs-description.adoc | 2 +-
.../javalang/shorts/WrapperShorts-description.adoc | 2 +-
.../strings/JavaLangStrings-description.adoc | 2 +-
.../javautil/uuids/JavaUtilUuids-description.adoc | 2 +-
.../booleans/PrimitiveBooleans-description.adoc | 2 +-
.../bytes/PrimitiveBytes-description.adoc | 2 +-
.../chars/PrimitiveChars-description.adoc | 2 +-
.../doubles/PrimitiveDoubles-description.adoc | 2 +-
.../floats/PrimitiveFloats-description.adoc | 2 +-
.../primitive/ints/PrimitiveInts-description.adoc | 2 +-
.../longs/PrimitiveLongs-description.adoc | 2 +-
.../shorts/PrimitiveShorts-description.adoc | 2 +-
.../demoshowcases/value/ValueShowCase.java | 413 ++++++++++++++++-----
.../demoshowcases/value/ValueTypeGenTemplate.java | 154 ++++++--
.../src/main/resources/$Templates-common.adoc | 4 +-
.../resources/$Templates-common~primitive.adoc | 4 +-
.../src/main/resources/$Templates-description.adoc | 14 +-
.../$Templates-description~primitive.adoc | 10 +-
.../metaprog/src/main/resources/$Templates.java | 13 +-
.../src/main/resources/$Templates.layout.xml | 2 -
.../{$Templates.java => $Templates~primitive.java} | 11 +-
.../src/main/resources/holder/$TemplateHolder.java | 19 +-
.../main/resources/holder/$TemplateHolder2.java | 18 +-
...older2.java => $TemplateHolder2~primitive.java} | 17 +-
.../holder/$TemplateHolder_actionReturning.java | 7 +-
.../$TemplateHolder_actionReturningArray.java | 9 +-
...lateHolder_actionReturningArray~primitive.java} | 7 +-
.../$TemplateHolder_actionReturningCollection.java | 7 +-
...older_actionReturningCollection~primitive.java} | 5 +-
...$TemplateHolder_actionReturning~primitive.java} | 5 +-
.../holder/$TemplateHolder_mixinProperty.java | 7 +-
...> $TemplateHolder_mixinProperty~primitive.java} | 5 +-
...plateHolder_updateReadOnlyOptionalProperty.java | 7 +-
..._updateReadOnlyOptionalPropertyWithChoices.java | 11 +-
.../$TemplateHolder_updateReadOnlyProperty.java | 9 +-
...teHolder_updateReadOnlyPropertyWithChoices.java | 13 +-
...dateReadOnlyPropertyWithChoices~primitive.java} | 11 +-
...teHolder_updateReadOnlyProperty~primitive.java} | 7 +-
.../holder/$TemplateHolder~primitive.java | 9 +-
.../resources/jdo/$TemplateJdo-description.adoc | 4 +-
.../jdo/$TemplateJdo-description~primitive.adoc | 4 +-
.../src/main/resources/jdo/$TemplateJdo.java | 15 +-
.../main/resources/jdo/$TemplateJdoEntities.java | 7 +-
...es.java => $TemplateJdoEntities~primitive.java} | 5 +-
.../src/main/resources/jdo/$TemplateJdo~lob.java | 15 +-
.../main/resources/jdo/$TemplateJdo~primitive.java | 11 +-
.../resources/jpa/$TemplateJpa-description.adoc | 4 +-
.../jpa/$TemplateJpa-description~primitive.adoc | 4 +-
.../src/main/resources/jpa/$TemplateJpa.java | 15 +-
.../main/resources/jpa/$TemplateJpaEntities.java | 7 +-
...es.java => $TemplateJpaEntities~primitive.java} | 5 +-
.../src/main/resources/jpa/$TemplateJpa~lob.java | 15 +-
.../main/resources/jpa/$TemplateJpa~primitive.java | 11 +-
.../resources/persistence/$TemplateEntity.java | 9 +-
.../persistence/$TemplateEntity.layout.xml | 2 -
...eEntity.java => $TemplateEntity~primitive.java} | 7 +-
.../$TemplateEntity~primitive.layout.xml | 2 -
.../resources/persistence/$TemplateSeeding.java | 5 +-
...eeding.java => $TemplateSeeding~primitive.java} | 3 +-
.../main/resources/samples/$TemplateSamples.java | 7 +-
...amples.java => $TemplateSamples~primitive.java} | 5 +-
.../main/resources/vm/$TemplateVm-description.adoc | 4 +-
.../vm/$TemplateVm-description~primitive.adoc | 4 +-
.../src/main/resources/vm/$TemplateVm.java | 24 +-
.../src/main/resources/vm/$TemplateVm.layout.xml | 2 -
.../main/resources/vm/$TemplateVm~primitive.java | 11 +-
.../resources/vm/$TemplateVm~primitive.layout.xml | 2 -
.../value/ValueTypeGenTemplateTest.java | 20 +-
84 files changed, 738 insertions(+), 396 deletions(-)
copy tooling/metaprog/src/main/resources/{$Templates.java => $Templates~primitive.java} (89%)
copy tooling/metaprog/src/main/resources/holder/{$TemplateHolder2.java => $TemplateHolder2~primitive.java} (74%)
copy tooling/metaprog/src/main/resources/holder/{$TemplateHolder_actionReturningArray.java => $TemplateHolder_actionReturningArray~primitive.java} (88%)
copy tooling/metaprog/src/main/resources/holder/{$TemplateHolder_actionReturningCollection.java => $TemplateHolder_actionReturningCollection~primitive.java} (92%)
copy tooling/metaprog/src/main/resources/holder/{$TemplateHolder_actionReturning.java => $TemplateHolder_actionReturning~primitive.java} (89%)
copy tooling/metaprog/src/main/resources/holder/{$TemplateHolder_mixinProperty.java => $TemplateHolder_mixinProperty~primitive.java} (90%)
copy tooling/metaprog/src/main/resources/holder/{$TemplateHolder_updateReadOnlyPropertyWithChoices.java => $TemplateHolder_updateReadOnlyPropertyWithChoices~primitive.java} (85%)
copy tooling/metaprog/src/main/resources/holder/{$TemplateHolder_updateReadOnlyProperty.java => $TemplateHolder_updateReadOnlyProperty~primitive.java} (89%)
copy tooling/metaprog/src/main/resources/jdo/{$TemplateJdoEntities.java => $TemplateJdoEntities~primitive.java} (90%)
copy tooling/metaprog/src/main/resources/jpa/{$TemplateJpaEntities.java => $TemplateJpaEntities~primitive.java} (90%)
copy tooling/metaprog/src/main/resources/persistence/{$TemplateEntity.java => $TemplateEntity~primitive.java} (87%)
copy tooling/metaprog/src/main/resources/persistence/{$TemplateSeeding.java => $TemplateSeeding~primitive.java} (92%)
copy tooling/metaprog/src/main/resources/samples/{$TemplateSamples.java => $TemplateSamples~primitive.java} (92%)
[causeway] 05/08: CAUSEWAY-2485 : tooling fixes
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit dceff268819715d095a094dfc056e188bbec14b3
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed May 17 20:35:48 2023 +0100
CAUSEWAY-2485 : tooling fixes
---
.../tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
index 5cde83d2f1..a522433ef8 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
@@ -74,7 +74,7 @@ public class ValueTypeGenTemplate {
public String getShowcaseValueSimpleType() {
String fqt = getShowcaseValueFullyQualifiedType();
- int i = fqt.lastIndexOf(",");
+ int i = fqt.lastIndexOf(".");
String simpleType = fqt.substring(i + 1);
return simpleType;
}
[causeway] 04/08: CAUSEWAY-2485 : tooling fixes.
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 1fe2ef1c50cc45f476ec7e9e6b3b5211bf0f110b
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed May 17 20:34:47 2023 +0100
CAUSEWAY-2485 : tooling fixes.
---
.../metaprog/demoshowcases/value/ValueTypeGenTemplate.java | 3 ++-
.../demoshowcases/value/ValueTypeGenTemplateTest.java | 14 +++++++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
index ca1df22a7e..5cde83d2f1 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
@@ -75,7 +75,8 @@ public class ValueTypeGenTemplate {
public String getShowcaseValueSimpleType() {
String fqt = getShowcaseValueFullyQualifiedType();
int i = fqt.lastIndexOf(",");
- return fqt.substring(i+1);
+ String simpleType = fqt.substring(i + 1);
+ return simpleType;
}
}
diff --git a/tooling/metaprog/src/test/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplateTest.java b/tooling/metaprog/src/test/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplateTest.java
index 3427eac8f3..e68178f117 100644
--- a/tooling/metaprog/src/test/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplateTest.java
+++ b/tooling/metaprog/src/test/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplateTest.java
@@ -61,7 +61,11 @@ class ValueTypeGenTemplateTest {
@SneakyThrows
void testShowcase(final ValueTypeGenTemplate.Config config) {
- val frameWorkRoot = new File(".").getAbsoluteFile().getParentFile().getParentFile().getParentFile();
+ var frameWorkRoot = new File(".").getAbsoluteFile().getParentFile().getParentFile().getParentFile();
+
+ // hack for Dan's PC; write out to a different git worktree
+ frameWorkRoot = new File(frameWorkRoot.getParentFile(), "demo");
+
val demoDomainRoot = new File(frameWorkRoot, "examples/demo/domain/src/main/java");
val demoDomainShowCase = new File(demoDomainRoot, config.getJavaPackage().replace('.', '/'));
@@ -78,11 +82,11 @@ class ValueTypeGenTemplateTest {
generator.generate(generatedFiles::add);
// override origin
-// copyFiles(generatedFiles, config.getOutputRootDir(), demoDomainShowCase);
-// copyMissingFiles(generatedFiles, config.getOutputRootDir(), demoDomainShowCase);
+ copyFiles(generatedFiles, config.getOutputRootDir(), demoDomainShowCase);
+ copyMissingFiles(generatedFiles, config.getOutputRootDir(), demoDomainShowCase);
- assertFileSetEquals(refShowcaseFiles, demoDomainShowCase, generatedFiles, config.getOutputRootDir());
- assertFileContentEquals(refShowcaseFiles, generatedFiles);
+// assertFileSetEquals(refShowcaseFiles, demoDomainShowCase, generatedFiles, config.getOutputRootDir());
+// assertFileContentEquals(refShowcaseFiles, generatedFiles);
}
[causeway] 08/08: CAUSEWAY-2845: further fixes for demo showcase value type templates
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit ebbf7aa6ee6f7ab0662e1804628e0aeb723a82d4
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu May 18 14:12:28 2023 +0100
CAUSEWAY-2845: further fixes for demo showcase value type templates
---
.../valuesemantics/BigDecimalValueSemantics.java | 8 ++++++-
.../valuesemantics/BigIntegerValueSemantics.java | 9 +++++++-
.../valuesemantics/URLValueSemantics.java | 5 +++--
.../demoshowcases/value/ValueShowCase.java | 25 ++++++++++++++++------
.../demoshowcases/value/ValueTypeGenTemplate.java | 13 ++++++-----
.../src/main/resources/vm/$TemplateVm.java | 9 ++++----
6 files changed, 50 insertions(+), 19 deletions(-)
diff --git a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/BigDecimalValueSemantics.java b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/BigDecimalValueSemantics.java
index 4b8e51a32b..7a1e791ade 100644
--- a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/BigDecimalValueSemantics.java
+++ b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/BigDecimalValueSemantics.java
@@ -21,6 +21,7 @@ package org.apache.causeway.core.metamodel.valuesemantics;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.function.UnaryOperator;
+import java.util.stream.Stream;
import javax.annotation.Priority;
import javax.inject.Inject;
@@ -166,7 +167,12 @@ implements
new BigDecimal("1001"),
new BigDecimal("-63.1"),
new BigDecimal("0.001"),
- BigDecimal.ZERO);
+ BigDecimal.ZERO,
+ BigDecimal.ONE,
+ BigDecimal.TEN,
+ BigDecimal.valueOf(123_456_789_012L),
+ BigDecimal.valueOf(1234567.8890f),
+ BigDecimal.valueOf(123_456_789_012L, 3));
}
}
diff --git a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/BigIntegerValueSemantics.java b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/BigIntegerValueSemantics.java
index 483468846f..bbea83b61b 100644
--- a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/BigIntegerValueSemantics.java
+++ b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/BigIntegerValueSemantics.java
@@ -125,7 +125,14 @@ implements
@Override
public Can<BigInteger> getExamples() {
- return Can.of(BigInteger.valueOf(-63L), BigInteger.ZERO);
+ return Can.of(
+ BigInteger.valueOf(42L),
+ BigInteger.valueOf(-63L),
+ BigInteger.ZERO,
+ BigInteger.ONE,
+ BigInteger.TEN,
+ BigInteger.valueOf(123_456_789_012L)
+ );
}
}
diff --git a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/URLValueSemantics.java b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/URLValueSemantics.java
index 5886cf335f..e458ea5801 100644
--- a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/URLValueSemantics.java
+++ b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/valuesemantics/URLValueSemantics.java
@@ -128,8 +128,9 @@ implements
@Override
public Can<URL> getExamples() {
return Can.of(
- new URL("https://a.b.c"),
- new URL("https://b.c.d"));
+ new URL("https://maps.google.com"),
+ new URL("https://en.wikipedia.org/wiki/Domain-driven_design")
+ );
}
}
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
index a198bfaca6..5d00f1f420 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
@@ -35,7 +35,7 @@ public enum ValueShowCase {
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BlobValueSemantics")
.descriptionIfNoPreamble("binary large objects")
.causewaySpecific(true)
- .templates(Template.NO_ORM_SET)
+ .templates(Template.NO_ORM_SET.remove(Template.SAMPLES))
.templateVariant(TemplateVariant.LOB)
),
CLOB(Config.builder()
@@ -45,7 +45,7 @@ public enum ValueShowCase {
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ClobValueSemantics")
.descriptionIfNoPreamble("character large objects")
.causewaySpecific(true)
- .templates(Template.NO_ORM_SET)
+ .templates(Template.NO_ORM_SET.remove(Template.SAMPLES))
.templateVariant(TemplateVariant.LOB)
),
LOCALRESOURCEPATH(Config.builder()
@@ -58,6 +58,7 @@ public enum ValueShowCase {
"When an action returns an instance of this type, then this is rendered as a redirect request to the browser to that resource.\n" +
"In this way you could for example return a link to a PDF or image (to be rendered by the web browser itself), or provide access to dynamic content by redirecting to a servlet.\n")
.causewaySpecific(true)
+ .templates(Template.REGULAR_SET_NO_SAMPLES)
.templateVariant(TemplateVariant.DEFAULT)
),
PASSWORD(Config.builder()
@@ -99,6 +100,7 @@ public enum ValueShowCase {
.frameworkSupportForJpa(true)
.frameworkSupportForJdo(true)
.frameworkSupportForJaxb(true)
+ .templates(Template.REGULAR_SET_NO_SAMPLES)
.templateVariant(TemplateVariant.DEFAULT)
),
JAVAMATHBIGDECIMAL(Config.builder()
@@ -138,6 +140,7 @@ public enum ValueShowCase {
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaSqlTimeStampValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `java.sql.Timestamp`.")
.caveat("Rather than use this data type, consider using a more modern class such as `java.time.OffsetDateTime`")
+ .jaxbAdapter("org.apache.causeway.applib.jaxb.JavaSqlJaxbAdapters.TimestampToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JAVATIMELOCALDATE(Config.builder()
@@ -146,6 +149,7 @@ public enum ValueShowCase {
.showcaseValueFullyQualifiedType("java.time.LocalDate")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalDateValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `java.time.LocalDate`.")
+ .jaxbAdapter("org.apache.causeway.applib.jaxb.JavaTimeJaxbAdapters.LocalDateToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JAVATIMELOCALDATETIME(Config.builder()
@@ -154,6 +158,7 @@ public enum ValueShowCase {
.showcaseValueFullyQualifiedType("java.time.LocalDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalDateTimeValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `java.time.LocalDateTime`.")
+ .jaxbAdapter("org.apache.causeway.applib.jaxb.JavaTimeJaxbAdapters.LocalDateTimeToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JAVATIMELOCALTIME(Config.builder()
@@ -162,6 +167,7 @@ public enum ValueShowCase {
.showcaseValueFullyQualifiedType("java.time.LocalTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalTimeValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `java.time.LocalTime`.")
+ .jaxbAdapter("org.apache.causeway.applib.jaxb.JavaTimeJaxbAdapters.LocalTimeToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JAVATIMEOFFSETDATETIME(Config.builder()
@@ -170,6 +176,7 @@ public enum ValueShowCase {
.showcaseValueFullyQualifiedType("java.time.OffsetDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.OffsetDateTimeValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `java.time.OffsetDateTime`.")
+ .jaxbAdapter("org.apache.causeway.applib.jaxb.JavaTimeJaxbAdapters.OffsetDateTimeToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JAVATIMEOFFSETTIME(Config.builder()
@@ -178,6 +185,7 @@ public enum ValueShowCase {
.showcaseValueFullyQualifiedType("java.time.OffsetTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.OffsetTimeValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `java.time.OffsetTime`.")
+ .jaxbAdapter("org.apache.causeway.applib.jaxb.JavaTimeJaxbAdapters.OffsetTimeAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JAVATIMEZONEDDATETIME(Config.builder()
@@ -186,6 +194,7 @@ public enum ValueShowCase {
.showcaseValueFullyQualifiedType("java.time.ZonedDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.ZonedDateTimeValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `java.time.ZonedDateTime`.")
+ .jaxbAdapter("org.apache.causeway.applib.jaxb.JavaTimeJaxbAdapters.ZonedDateTimeAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JAVAUTILDATE(Config.builder()
@@ -200,38 +209,42 @@ public enum ValueShowCase {
),
JODADATETIME(Config.builder()
.showcaseName("JodaDateTime")
- .javaPackage("demoapp.dom.types.javatime.jodadatetime")
+ .javaPackage("demoapp.dom.types.jodatime.jodadatetime")
.showcaseValueFullyQualifiedType("org.joda.time.DateTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaDateTimeValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `org.joda.time.DateTime`.")
.caveat("Rather than use this data type, consider using a more modern class such as `java.time.OffsetDateTime`.")
+ .jaxbAdapter("org.apache.causeway.valuetypes.jodatime.applib.jaxb.JodaTimeJaxbAdapters.DateTimeToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JODALOCALDATE(Config.builder()
.showcaseName("JodaLocalDate")
- .javaPackage("demoapp.dom.types.javatime.jodalocaldate")
+ .javaPackage("demoapp.dom.types.jodatime.jodalocaldate")
.showcaseValueFullyQualifiedType("org.joda.time.LocalDate")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalDateValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `org.joda.time.LocalDate`")
.caveat("Rather than use this data type, consider using a more modern class such as `java.time.LocalDate`.")
+ .jaxbAdapter("org.apache.causeway.valuetypes.jodatime.applib.jaxb.JodaTimeJaxbAdapters.LocalDateToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JODALOCALDATETIME(Config.builder()
.showcaseName("JodaLocalDateTime")
- .javaPackage("demoapp.dom.types.javatime.jodalocaldatetime")
+ .javaPackage("demoapp.dom.types.jodatime.jodalocaldatetime")
.showcaseValueFullyQualifiedType("org.joda.time.LocalDateTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalDateTimeValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `org.joda.time.LocalDateTime`.")
.caveat("Rather than use this data type, consider using a more modern class such as `java.time.LocalDateTime`.")
+ .jaxbAdapter("org.apache.causeway.valuetypes.jodatime.applib.jaxb.JodaTimeJaxbAdapters.LocalDateTimeToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
JODALOCALTIME(Config.builder()
.showcaseName("JodaLocalTime")
- .javaPackage("demoapp.dom.types.javatime.jodalocaltime")
+ .javaPackage("demoapp.dom.types.jodatime.jodalocaltime")
.showcaseValueFullyQualifiedType("org.joda.time.LocalTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalTimeValueSemantics")
.preamble("The framework has built-in support for a number of temporal types, including `org.joda.time.LocalTime`.")
.caveat("Rather than use this data type, consider using a more modern class such as `java.time.LocalTime`.")
+ .jaxbAdapter("org.apache.causeway.valuetypes.jodatime.applib.jaxb.JodaTimeJaxbAdapters.LocalTimeToStringAdapter")
.templateVariant(TemplateVariant.DEFAULT)
),
MARKUP(Config.builder()
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
index e2ad87d441..138da90ca7 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
@@ -119,10 +119,10 @@ public class ValueTypeGenTemplate {
final boolean frameworkSupportForJaxb;
/**
- * Implied by {@link #isCausewaySpecific()}, if present then indicates that the framework has added support for JAXB serialization for certain data types.
+ * Implied by {@link #isCausewaySpecific()} or a non-null {@link #getJaxbAdapter()}, if present then indicates that the framework has added support for JAXB serialization for certain data types.
*/
private boolean isFrameworkSupportForJaxb() {
- return causewaySpecific || frameworkSupportForJaxb;
+ return causewaySpecific || frameworkSupportForJaxb || jaxbAdapter != null;
}
public String getJaxbTypeSupportNotice() {
return isFrameworkSupportForJaxb()
@@ -130,7 +130,10 @@ public class ValueTypeGenTemplate {
: "JAXB supports `" + getShowcaseValueSimpleType() + "` out-of-the-box, so no special annotations are required.\nSee link:https://docs.oracle.com/cd/E12840_01/wls/docs103/webserv/data_types.html#wp223908[Oracle]";
}
-
+ /**
+ * If specified, then used to annotate properties of JAXB view models.
+ */
+ final String jaxbAdapter;
final String javaPackage;
@Builder.Default
final String fileNamePlaceholderForShowcaseName = "$Template";
@@ -235,8 +238,7 @@ public class ValueTypeGenTemplate {
.remove(VIEWMODEL_DESCRIPTION)
.remove(VIEWMODEL_LAYOUT);
- public static Can<Template> REGULAR_SET_NO_SAMPLES = Can.ofArray(Template.values())
- .remove(HOLDER_ACTION_RETURNING_ARRAY)
+ public static Can<Template> REGULAR_SET_NO_SAMPLES = REGULAR_SET
.remove(SAMPLES);
public static Can<Template> PRIMITIVE_SET = Can.ofArray(Template.values())
@@ -326,6 +328,7 @@ public class ValueTypeGenTemplate {
.map(cls->boolean.class.equals(cls) ? "is" : "get")
.orElse("get"));
+ templateVars.put("showcase-jaxb-adapter-type", (config.getJaxbAdapter() != null ? "@XmlJavaTypeAdapter(" + config.getJaxbAdapter() + ".class)\n " : "" ));
templateVars.put("showcase-java-package", config.javaPackage);
templateVars.put("showcase-value-semantics-provider", config.showcaseValueSemantics);
templateVars.put("generated-file-notice", template.generator.formatAsComment(config.generatedFileNotice));
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm.java b/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
index be220ad1b7..8545d39e4f 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
@@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.apache.causeway.applib.annotation.DomainObject;
import org.apache.causeway.applib.annotation.Editing;
@@ -61,24 +62,24 @@ public class /*${showcase-name}*/Vm
//tag::class[]
@Title(prepend = "/*${showcase-simple-type}*/ view model: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
- @XmlElement(required = true) // <.>
+ /*${showcase-jaxb-adapter-type}*/@XmlElement(required = true) // <.>
@Getter @Setter
private /*${showcase-simple-type}*/ readOnlyProperty;
@Property(editing = Editing.ENABLED) // <.>
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
- @XmlElement(required = true)
+ /*${showcase-jaxb-adapter-type}*/@XmlElement(required = true)
@Getter @Setter
private /*${showcase-simple-type}*/ readWriteProperty;
@Property(optionality = Optionality.OPTIONAL) // <.>
@PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
- @Getter @Setter
+ /*${showcase-jaxb-adapter-type}*/@Getter @Setter
private /*${showcase-simple-type}*/ readOnlyOptionalProperty;
@Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
@PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
- @Getter @Setter
+ /*${showcase-jaxb-adapter-type}*/@Getter @Setter
private /*${showcase-simple-type}*/ readWriteOptionalProperty;
}
[causeway] 03/08: CAUSEWAY-2485 : updates templates
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit f0c45e80d3aa422fe6a7dc128a98e84ee2182765
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed May 17 20:21:52 2023 +0100
CAUSEWAY-2485 : updates templates
---
.../demoshowcases/value/ValueShowCase.java | 92 +++++++++++-----------
.../demoshowcases/value/ValueTypeGenTemplate.java | 28 ++++---
.../src/main/resources/$Templates-common.adoc | 2 +-
.../resources/$Templates-common~primitive.adoc | 2 +-
.../src/main/resources/$Templates-description.adoc | 6 +-
.../$Templates-description~primitive.adoc | 6 +-
.../metaprog/src/main/resources/$Templates.java | 12 +--
.../src/main/resources/holder/$TemplateHolder.java | 18 +++--
.../main/resources/holder/$TemplateHolder2.java | 9 ++-
.../holder/$TemplateHolder_actionReturning.java | 4 +-
.../$TemplateHolder_actionReturningArray.java | 8 +-
.../$TemplateHolder_actionReturningCollection.java | 6 +-
.../holder/$TemplateHolder_mixinProperty.java | 4 +-
...plateHolder_updateReadOnlyOptionalProperty.java | 6 +-
..._updateReadOnlyOptionalPropertyWithChoices.java | 10 ++-
.../$TemplateHolder_updateReadOnlyProperty.java | 6 +-
...teHolder_updateReadOnlyPropertyWithChoices.java | 10 ++-
.../holder/$TemplateHolder~primitive.java | 10 ++-
.../src/main/resources/jdo/$TemplateJdo.java | 14 ++--
.../main/resources/jdo/$TemplateJdoEntities.java | 6 +-
.../src/main/resources/jdo/$TemplateJdo~lob.java | 14 ++--
.../main/resources/jdo/$TemplateJdo~primitive.java | 12 +--
.../src/main/resources/jpa/$TemplateJpa.java | 14 ++--
.../main/resources/jpa/$TemplateJpaEntities.java | 6 +-
.../src/main/resources/jpa/$TemplateJpa~lob.java | 14 ++--
.../main/resources/jpa/$TemplateJpa~primitive.java | 12 +--
.../resources/persistence/$TemplateEntity.java | 6 +-
.../resources/persistence/$TemplateSeeding.java | 4 +-
.../main/resources/samples/$TemplateSamples.java | 6 +-
.../src/main/resources/vm/$TemplateVm.java | 14 ++--
.../main/resources/vm/$TemplateVm~primitive.java | 12 +--
31 files changed, 214 insertions(+), 159 deletions(-)
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
index 74e9a23808..f942e1d1e5 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
@@ -33,183 +33,183 @@ public enum ValueShowCase {
BLOB(Config.builder()
.showcaseName("CausewayBlob")
.javaPackage("demoapp.dom.types.causeway.blobs")
- .showcaseValueType("org.apache.causeway.applib.value.Blob")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Blob")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BlobValueSemantics")
.templateVariant(TemplateVariant.LOB)),
CLOB(Config.builder()
.showcaseName("CausewayClob")
.javaPackage("demoapp.dom.types.causeway.clobs")
- .showcaseValueType("org.apache.causeway.applib.value.Clob")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Clob")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ClobValueSemantics")
.templateVariant(TemplateVariant.LOB)),
LOCALRESOURCEPATH(Config.builder()
.showcaseName("CausewayLocalResourcePath")
.javaPackage("demoapp.dom.types.causeway.localresourcepaths")
- .showcaseValueType("org.apache.causeway.applib.value.LocalResourcePath")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.LocalResourcePath")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.LocalResourcePathValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
PASSWORD(Config.builder()
.showcaseName("CausewayPassword")
.javaPackage("demoapp.dom.types.causeway.passwords")
- .showcaseValueType("org.apache.causeway.applib.value.Password")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Password")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.PasswordValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
TREENODE(Config.builder()
.showcaseName("CausewayTreeNode")
.javaPackage("demoapp.dom.types.causeway.treenode")
- .showcaseValueType("org.apache.causeway.applib.graph.tree.TreeNode")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.applib.graph.tree.TreeNode")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.TreeNodeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
CALENDAREVENT(Config.builder()
.showcaseName("CausewayCalendarEvent")
.javaPackage("demoapp.dom.types.causewayext.cal")
- .showcaseValueType("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEvent")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEvent")
.showcaseValueSemantics("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEventSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVAAWTBUFFEREDIMAGE(Config.builder()
.showcaseName("BufferedImage")
.javaPackage("demoapp.dom.types.javaawt.images")
- .showcaseValueType("java.awt.BufferedImage")
+ .showcaseValueFullyQualifiedType("java.awt.BufferedImage")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BufferedImageValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVAMATHBIGDECIMAL(Config.builder()
.showcaseName("BigDecimal")
.javaPackage("demoapp.dom.types.javamath.bigdecimals")
- .showcaseValueType("java.math.BigDecimal")
+ .showcaseValueFullyQualifiedType("java.math.BigDecimal")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BigDecimalValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVAMATHBIGINTEGER(Config.builder()
.showcaseName("BigInteger")
.javaPackage("demoapp.dom.types.javamath.bigintegers")
- .showcaseValueType("java.math.BigInteger")
+ .showcaseValueFullyQualifiedType("java.math.BigInteger")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BigIntegerValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVANETURL(Config.builder()
.showcaseName("URLs")
.javaPackage("demoapp.dom.types.javanet.urls")
- .showcaseValueType("java.net.URL")
+ .showcaseValueFullyQualifiedType("java.net.URL")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.URLValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVASQLDATE(Config.builder()
.showcaseName("JavaSqlDate")
.javaPackage("demoapp.dom.types.javasql.javasqldate")
- .showcaseValueType("java.sql.Date")
+ .showcaseValueFullyQualifiedType("java.sql.Date")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaSqlDateValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVASQLTIMESTAMP(Config.builder()
.showcaseName("JavaSqlTimestamp")
.javaPackage("demoapp.dom.types.javasql.javasqltimestamp")
- .showcaseValueType("java.sql.Timestamp")
+ .showcaseValueFullyQualifiedType("java.sql.Timestamp")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaSqlTimeStampValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVATIMELOCALDATE(Config.builder()
.showcaseName("LocalDate")
.javaPackage("demoapp.dom.types.javatime.javatimelocaldate")
- .showcaseValueType("java.time.LocalDate")
+ .showcaseValueFullyQualifiedType("java.time.LocalDate")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalDateValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVATIMELOCALDATETIME(Config.builder()
.showcaseName("LocalDateTime")
.javaPackage("demoapp.dom.types.javatime.javatimelocaldatetime")
- .showcaseValueType("java.time.LocalDateTime")
+ .showcaseValueFullyQualifiedType("java.time.LocalDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalDateTimeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVATIMELOCALTIME(Config.builder()
.showcaseName("LocalTime")
.javaPackage("demoapp.dom.types.javatime.javatimelocaltime")
- .showcaseValueType("java.time.LocalTime")
+ .showcaseValueFullyQualifiedType("java.time.LocalTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalTimeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVATIMEOFFSETDATETIME(Config.builder()
.showcaseName("OffsetDateTime")
.javaPackage("demoapp.dom.types.javatime.javatimeoffsetdatetime")
- .showcaseValueType("java.time.OffsetDateTime")
+ .showcaseValueFullyQualifiedType("java.time.OffsetDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.OffsetDateTimeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVATIMEOFFSETTIME(Config.builder()
.showcaseName("OffsetTime")
.javaPackage("demoapp.dom.types.javatime.javatimeoffsetTime")
- .showcaseValueType("java.time.OffsetTime")
+ .showcaseValueFullyQualifiedType("java.time.OffsetTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.OffsetTimeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVATIMEZONEDDATETIME(Config.builder()
.showcaseName("ZonedDateTime")
.javaPackage("demoapp.dom.types.javatime.javatimezoneddatetime")
- .showcaseValueType("java.time.ZonedDateTime")
+ .showcaseValueFullyQualifiedType("java.time.ZonedDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.ZonedDateTimeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVAUTILDATE(Config.builder()
.showcaseName("JavaUtilDate")
.javaPackage("demoapp.dom.types.javautil.javautildate")
- .showcaseValueType("java.util.Date")
+ .showcaseValueFullyQualifiedType("java.util.Date")
.showcaseValueSemantics("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEventSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JODADATETIME(Config.builder()
.showcaseName("JodaDateTime")
.javaPackage("demoapp.dom.types.javatime.jodadatetime")
- .showcaseValueType("org.joda.time.DateTime")
+ .showcaseValueFullyQualifiedType("org.joda.time.DateTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaDateTimeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JODALOCALDATE(Config.builder()
.showcaseName("JodaLocalDate")
.javaPackage("demoapp.dom.types.javatime.jodalocaldate")
- .showcaseValueType("org.joda.time.LocalDate")
+ .showcaseValueFullyQualifiedType("org.joda.time.LocalDate")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalDateValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JODALOCALDATETIME(Config.builder()
.showcaseName("JodaLocalDateTime")
.javaPackage("demoapp.dom.types.javatime.jodalocaldatetime")
- .showcaseValueType("org.joda.time.LocalDateTime")
+ .showcaseValueFullyQualifiedType("org.joda.time.LocalDateTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalDateTimeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JODALOCALTIME(Config.builder()
.showcaseName("JodaLocalTime")
.javaPackage("demoapp.dom.types.javatime.jodalocaltime")
- .showcaseValueType("org.joda.time.LocalTime")
+ .showcaseValueFullyQualifiedType("org.joda.time.LocalTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalTimeValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
MARKUP(Config.builder()
.showcaseName("CausewayMarkup")
.javaPackage("demoapp.dom.types.causeway.markups")
- .showcaseValueType("org.apache.causeway.applib.value.Markup")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Markup")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.MarkupValueSemantics")
.templateVariant(TemplateVariant.LOB)),
MARKDOWN(Config.builder()
.showcaseName("CausewayMarkdown")
.javaPackage("demoapp.dom.types.causewayval.markdowns")
- .showcaseValueType("org.apache.causeway.valuetypes.markdown.applib.value.Markdown")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.valuetypes.markdown.applib.value.Markdown")
.showcaseValueSemantics("org.apache.causeway.valuetypes.markdown.metamodel.semantics.MarkdownValueSemantics")
.templates(Template.REGULAR_SET_NO_SAMPLES) // demo provides its own MarkdownSamples
.templateVariant(TemplateVariant.LOB)),
ASCIIDOC(Config.builder()
.showcaseName("CausewayAsciiDoc")
.javaPackage("demoapp.dom.types.causewayval.asciidocs")
- .showcaseValueType("org.apache.causeway.valuetypes.asciidoc.applib.value.AsciiDoc")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.valuetypes.asciidoc.applib.value.AsciiDoc")
.showcaseValueSemantics("org.apache.causeway.valuetypes.asciidoc.metamodel.semantics.AsciiDocValueSemantics")
.templates(Template.REGULAR_SET_NO_SAMPLES) // demo provides its own AsciiDocSamples
.templateVariant(TemplateVariant.LOB)),
VEGA(Config.builder()
.showcaseName("CausewayVega")
.javaPackage("demoapp.dom.types.causewayval.vegas")
- .showcaseValueType("org.apache.causeway.valuetypes.vega.applib.value.Vega")
+ .showcaseValueFullyQualifiedType("org.apache.causeway.valuetypes.vega.applib.value.Vega")
.showcaseValueSemantics("org.apache.causeway.valuetypes.vega.metamodel.semantics.VegaValueSemantics")
.templateVariant(TemplateVariant.LOB)),
UUID(Config.builder()
.showcaseName("JavaUtilUuid")
.javaPackage("demoapp.dom.types.javautil.uuids")
- .showcaseValueType("java.util.UUID")
+ .showcaseValueFullyQualifiedType("java.util.UUID")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.UUIDValueSemantics")),
ENUM(Config.builder()
.showcaseName("JavaLangEnum")
.javaPackage("demoapp.dom.types.javalang.enums")
- .showcaseValueType("demoapp.dom._infra.samples.DemoEnum")
+ .showcaseValueFullyQualifiedType("demoapp.dom._infra.samples.DemoEnum")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.EnumValueSemantics")
.templates(Template.REGULAR_SET_NO_SAMPLES)), // demo provides its own EnumSamples
STRING(Config.builder()
.showcaseName("JavaLangString")
.javaPackage("demoapp.dom.types.javalang.strings")
- .showcaseValueType("java.lang.String")
+ .showcaseValueFullyQualifiedType("java.lang.String")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.StringValueSemantics")
.templates(Template.REGULAR_SET_NO_SAMPLES)), // demo provides its own NameSamples
// VOID(Config.builder()
@@ -221,98 +221,98 @@ public enum ValueShowCase {
PBOOL(fundamentalTypeSupportNotice()
.showcaseName("PrimitiveBoolean")
.javaPackage("demoapp.dom.types.primitive.booleans")
- .showcaseValueType("boolean")
+ .showcaseValueFullyQualifiedType("boolean")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BooleanValueSemantics")
.templates(Template.PRIMITIVE_SET)
.templateVariant(TemplateVariant.PRIMITIVE)),
PCHAR(fundamentalTypeSupportNotice()
.showcaseName("PrimitiveChar")
.javaPackage("demoapp.dom.types.primitive.chars")
- .showcaseValueType("char")
+ .showcaseValueFullyQualifiedType("char")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.CharacterValueSemantics")
.templates(Template.PRIMITIVE_SET)
.templateVariant(TemplateVariant.PRIMITIVE)),
PLONG(fundamentalTypeSupportNotice()
.showcaseName("PrimitiveLong")
.javaPackage("demoapp.dom.types.primitive.longs")
- .showcaseValueType("long")
+ .showcaseValueFullyQualifiedType("long")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.LongValueSemantics")
.templates(Template.PRIMITIVE_SET)
.templateVariant(TemplateVariant.PRIMITIVE)),
PINT(fundamentalTypeSupportNotice()
.showcaseName("PrimitiveInt")
.javaPackage("demoapp.dom.types.primitive.ints")
- .showcaseValueType("int")
+ .showcaseValueFullyQualifiedType("int")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.IntValueSemantics")
.templates(Template.PRIMITIVE_SET)
.templateVariant(TemplateVariant.PRIMITIVE)),
PSHORT(fundamentalTypeSupportNotice()
.showcaseName("PrimitiveShort")
.javaPackage("demoapp.dom.types.primitive.shorts")
- .showcaseValueType("short")
+ .showcaseValueFullyQualifiedType("short")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ShortValueSemantics")
.templates(Template.PRIMITIVE_SET)
.templateVariant(TemplateVariant.PRIMITIVE)),
PBYTE(fundamentalTypeSupportNotice()
.showcaseName("PrimitiveByte")
.javaPackage("demoapp.dom.types.primitive.bytes")
- .showcaseValueType("byte")
+ .showcaseValueFullyQualifiedType("byte")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ByteValueSemantics")
.templates(Template.PRIMITIVE_SET)
.templateVariant(TemplateVariant.PRIMITIVE)),
PDOUBLE(fundamentalTypeSupportNotice()
.showcaseName("PrimitiveDouble")
.javaPackage("demoapp.dom.types.primitive.doubles")
- .showcaseValueType("double")
+ .showcaseValueFullyQualifiedType("double")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.DoubleValueSemantics")
.templates(Template.PRIMITIVE_SET)
.templateVariant(TemplateVariant.PRIMITIVE)),
PFLOAT(fundamentalTypeSupportNotice()
.showcaseName("PrimitiveFloat")
.javaPackage("demoapp.dom.types.primitive.floats")
- .showcaseValueType("float")
+ .showcaseValueFullyQualifiedType("float")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.FloatValueSemantics")
.templates(Template.PRIMITIVE_SET)
.templateVariant(TemplateVariant.PRIMITIVE)),
WBOOL(fundamentalTypeSupportNotice()
.showcaseName("WrapperBoolean")
.javaPackage("demoapp.dom.types.javalang.booleans")
- .showcaseValueType("java.lang.Boolean")
+ .showcaseValueFullyQualifiedType("java.lang.Boolean")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BooleanValueSemantics")),
WCHAR(fundamentalTypeSupportNotice()
.showcaseName("WrapperCharacter")
.javaPackage("demoapp.dom.types.javalang.characters")
- .showcaseValueType("java.lang.Character")
+ .showcaseValueFullyQualifiedType("java.lang.Character")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.CharacterValueSemantics")),
WLONG(fundamentalTypeSupportNotice()
.showcaseName("WrapperLong")
.javaPackage("demoapp.dom.types.javalang.longs")
- .showcaseValueType("java.lang.Long")
+ .showcaseValueFullyQualifiedType("java.lang.Long")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.LongValueSemantics")),
WINT(fundamentalTypeSupportNotice()
.showcaseName("WrapperInteger")
.javaPackage("demoapp.dom.types.javalang.integers")
- .showcaseValueType("java.lang.Integer")
+ .showcaseValueFullyQualifiedType("java.lang.Integer")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.IntValueSemantics")),
WSHORT(fundamentalTypeSupportNotice()
.showcaseName("WrapperShort")
.javaPackage("demoapp.dom.types.javalang.shorts")
- .showcaseValueType("java.lang.Short")
+ .showcaseValueFullyQualifiedType("java.lang.Short")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ShortValueSemantics")),
WBYTE(fundamentalTypeSupportNotice()
.showcaseName("WrapperByte")
.javaPackage("demoapp.dom.types.javalang.bytes")
- .showcaseValueType("java.lang.Byte")
+ .showcaseValueFullyQualifiedType("java.lang.Byte")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ByteValueSemantics")),
WDOUBLE(fundamentalTypeSupportNotice()
.showcaseName("WrapperDouble")
.javaPackage("demoapp.dom.types.javalang.doubles")
- .showcaseValueType("java.lang.Double")
+ .showcaseValueFullyQualifiedType("java.lang.Double")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.DoubleValueSemantics")),
WFLOAT(fundamentalTypeSupportNotice()
.showcaseName("WrapperFloat")
.javaPackage("demoapp.dom.types.javalang.floats")
- .showcaseValueType("java.lang.Float")
+ .showcaseValueFullyQualifiedType("java.lang.Float")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.FloatValueSemantics")),
;
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
index df1b47a5ce..ca1df22a7e 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
@@ -34,7 +34,6 @@ import org.apache.causeway.commons.internal.base._Strings;
import org.apache.causeway.commons.internal.exceptions._Exceptions;
import org.apache.causeway.commons.io.FileUtils;
import org.apache.causeway.commons.io.TextUtils;
-import org.apache.causeway.tooling.metaprog.demoshowcases.value.ValueTypeGenTemplate.TemplateVariant;
import lombok.Builder;
import lombok.Getter;
@@ -50,17 +49,17 @@ public class ValueTypeGenTemplate {
public static class Config {
final File outputRootDir;
final String showcaseName;
- final String showcaseValueType;
+ final String showcaseValueFullyQualifiedType;
final String showcaseValueSemantics;
@Builder.Default
final String jdoTypeSupportNotice =
- "JDO supports `#{showcase-type}` out-of-the-box, so no special annotations are required.";
+ "JDO supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
@Builder.Default
final String jpaTypeSupportNotice =
- "JPA supports `#{showcase-type}` out-of-the-box, so no special annotations are required.";
+ "JPA supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
@Builder.Default
final String jaxbTypeSupportNotice =
- "JAXB supports `#{showcase-type}` out-of-the-box, so no special annotations are required.";
+ "JAXB supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
final String javaPackage;
@Builder.Default
final String fileNamePlaceholderForShowcaseName = "$Template";
@@ -72,6 +71,12 @@ public class ValueTypeGenTemplate {
final Can<Template> templates = Template.REGULAR_SET;
@Builder.Default
final TemplateVariant templateVariant = TemplateVariant.DEFAULT;
+
+ public String getShowcaseValueSimpleType() {
+ String fqt = getShowcaseValueFullyQualifiedType();
+ int i = fqt.lastIndexOf(",");
+ return fqt.substring(i+1);
+ }
}
@RequiredArgsConstructor
@@ -221,15 +226,16 @@ public class ValueTypeGenTemplate {
templateVars.putAll(config.templateVariables);
templateVars.put("java-package", template.javaPackage(config));
templateVars.put("showcase-name", config.showcaseName);
- templateVars.put("showcase-type", config.showcaseValueType);
- templateVars.put("showcase-type-boxed",
- Optional.ofNullable(ClassUtils.resolvePrimitiveClassName(config.showcaseValueType))
+ templateVars.put("showcase-simple-type", config.getShowcaseValueSimpleType());
+ templateVars.put("showcase-fully-qualified-type", config.showcaseValueFullyQualifiedType);
+ templateVars.put("showcase-simple-type-boxed",
+ Optional.ofNullable(ClassUtils.resolvePrimitiveClassName(config.showcaseValueFullyQualifiedType))
.map(ClassUtils::resolvePrimitiveIfNecessary)
.map(Class::getName)
- .orElse(config.showcaseValueType));
+ .orElse(config.showcaseValueFullyQualifiedType));
- templateVars.put("showcase-type-getter-prefix",
- Optional.ofNullable(ClassUtils.resolvePrimitiveClassName(config.showcaseValueType))
+ templateVars.put("showcase-simple-type-getter-prefix",
+ Optional.ofNullable(ClassUtils.resolvePrimitiveClassName(config.showcaseValueFullyQualifiedType))
.map(cls->boolean.class.equals(cls) ? "is" : "get")
.orElse("get"));
diff --git a/tooling/metaprog/src/main/resources/$Templates-common.adoc b/tooling/metaprog/src/main/resources/$Templates-common.adoc
index 2636730940..b62f77449c 100644
--- a/tooling/metaprog/src/main/resources/$Templates-common.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-common.adoc
@@ -4,7 +4,7 @@
== Mixin actions
-A number of mixin actions contribute through the `#{showcase-name}Holder` interface, demonstrate the use of `#{showcase-type}` as a parameter and as a return type.
+A number of mixin actions contribute through the `#{showcase-name}Holder` interface, demonstrate the use of `#{showcase-simple-type}` as a parameter and as a return type.
For example:
* the `updateReadOnlyProperty` action is:
diff --git a/tooling/metaprog/src/main/resources/$Templates-common~primitive.adoc b/tooling/metaprog/src/main/resources/$Templates-common~primitive.adoc
index 4f361e493c..3fd411afd2 100644
--- a/tooling/metaprog/src/main/resources/$Templates-common~primitive.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-common~primitive.adoc
@@ -4,7 +4,7 @@
== Mixin actions
-A number of mixin actions contribute through the `#{showcase-name}Holder` interface, demonstrate the use of `#{showcase-type}` as a parameter and as a return type.
+A number of mixin actions contribute through the `#{showcase-name}Holder` interface, demonstrate the use of `#{showcase-simple-type}` as a parameter and as a return type.
For example:
* the `updateReadOnlyProperty` action is:
diff --git a/tooling/metaprog/src/main/resources/$Templates-description.adoc b/tooling/metaprog/src/main/resources/$Templates-description.adoc
index adea212d55..c8ce1f963a 100644
--- a/tooling/metaprog/src/main/resources/$Templates-description.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-description.adoc
@@ -2,13 +2,13 @@
//#{generated-file-notice}
-The framework has built-in support for the `#{showcase-type}` data type.
+The framework has built-in support for the `#{showcase-simple-type}` data type.
These can be used either in entities or view models.
== How this demo works
-On the left hand side is a collection of entities that uses the `#{showcase-type}` datatype.
-There is also an action that opens a view model; this view model also uses the `#{showcase-type}` datatype.
+On the left hand side is a collection of entities that uses the `#{showcase-simple-type}` datatype.
+There is also an action that opens a view model; this view model also uses the `#{showcase-simple-type}` datatype.
Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
diff --git a/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc b/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
index 44a0b6ded6..05068f3cd7 100644
--- a/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
@@ -3,13 +3,13 @@
//#{generated-file-notice}
-The framework has built-in support for the (primitive) `#{showcase-type}` data type.
+The framework has built-in support for the (primitive) `#{showcase-simple-type}` data type.
These can be used either in entities or view models.
== How this demo works
-On the left hand side is a collection of entities that uses the `#{showcase-type}` datatype.
-There is also an action that opens a view model; this view model also uses the `#{showcase-type}` datatype.
+On the left hand side is a collection of entities that uses the `#{showcase-simple-type}` datatype.
+There is also an action that opens a view model; this view model also uses the `#{showcase-simple-type}` datatype.
Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
diff --git a/tooling/metaprog/src/main/resources/$Templates.java b/tooling/metaprog/src/main/resources/$Templates.java
index a92e5acbb4..4829d3ec86 100644
--- a/tooling/metaprog/src/main/resources/$Templates.java
+++ b/tooling/metaprog/src/main/resources/$Templates.java
@@ -39,6 +39,8 @@ import org.apache.causeway.applib.annotation.ObjectSupport;
import org.apache.causeway.applib.annotation.PromptStyle;
import org.apache.causeway.applib.annotation.SemanticsOf;
+import /*${showcase-fully-qualified-type}*/;
+
import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
import demoapp.dom._infra.values.ValueHolderRepository;
import demoapp.dom.types.Samples;
@@ -55,15 +57,15 @@ import /*${showcase-java-package}*/.vm./*${showcase-name}*/Vm;
public class /*${showcase-name}*/s implements HasAsciiDocDescription {
@ObjectSupport public String title() {
- return "/*${showcase-type}*/ data type";
+ return "/*${showcase-simple-type}*/ data type";
}
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(promptStyle = PromptStyle.DIALOG_MODAL)
- public /*${showcase-name}*/Vm openViewModel(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Vm openViewModel(final /*${showcase-simple-type}*/ initialValue) {
return new /*${showcase-name}*/Vm(initialValue);
}
- @MemberSupport public /*${showcase-type}*/ default0OpenViewModel() {
+ @MemberSupport public /*${showcase-simple-type}*/ default0OpenViewModel() {
return samples.single();
}
@@ -74,10 +76,10 @@ public class /*${showcase-name}*/s implements HasAsciiDocDescription {
@Inject
@XmlTransient
- ValueHolderRepository</*${showcase-type-boxed}*/, ? extends /*${showcase-name}*/Entity> entities;
+ ValueHolderRepository</*${showcase-simple-type-boxed}*/, ? extends /*${showcase-name}*/Entity> entities;
@Inject
@XmlTransient
- Samples</*${showcase-type-boxed}*/> samples;
+ Samples</*${showcase-simple-type-boxed}*/> samples;
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder.java
index e24e96240e..c00b4263ab 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder.java
@@ -20,22 +20,24 @@ package /*${java-package}*/;
import javax.inject.Named;
+import /*${showcase-fully-qualified-type}*/;
+
/*${generated-file-notice}*/
@Named("demo./*${showcase-name}*/Holder")
//tag::class[]
public interface /*${showcase-name}*/Holder {
- /*${showcase-type}*/ getReadOnlyProperty();
- void setReadOnlyProperty(/*${showcase-type}*/ c);
+ /*${showcase-simple-type}*/ getReadOnlyProperty();
+ void setReadOnlyProperty(/*${showcase-simple-type}*/ c);
- /*${showcase-type}*/ getReadWriteProperty();
- void setReadWriteProperty(/*${showcase-type}*/ c);
+ /*${showcase-simple-type}*/ getReadWriteProperty();
+ void setReadWriteProperty(/*${showcase-simple-type}*/ c);
- /*${showcase-type}*/ getReadOnlyOptionalProperty();
- void setReadOnlyOptionalProperty(/*${showcase-type}*/ c);
+ /*${showcase-simple-type}*/ getReadOnlyOptionalProperty();
+ void setReadOnlyOptionalProperty(/*${showcase-simple-type}*/ c);
- /*${showcase-type}*/ getReadWriteOptionalProperty();
- void setReadWriteOptionalProperty(/*${showcase-type}*/ c);
+ /*${showcase-simple-type}*/ getReadWriteOptionalProperty();
+ void setReadWriteOptionalProperty(/*${showcase-simple-type}*/ c);
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java
index 9f36ab584c..63eba1b856 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java
@@ -22,6 +22,7 @@ import org.apache.causeway.applib.annotation.LabelPosition;
import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Where;
+import /*${showcase-fully-qualified-type}*/;
/*${generated-file-notice}*/
//tag::class[]
@@ -34,7 +35,7 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=LEFT)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "1") // <.>
- default /*${showcase-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionLeft() {
+ default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionLeft() {
return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
@@ -45,7 +46,7 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=TOP)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "2")
- default /*${showcase-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionTop() {
+ default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionTop() {
return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
@@ -56,7 +57,7 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=RIGHT)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "3")
- default /*${showcase-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionRight() {
+ default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionRight() {
return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
@@ -67,7 +68,7 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=NONE)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "4")
- default /*${showcase-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionNone() {
+ default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionNone() {
return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java
index 89c959d86f..bce9d846fb 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java
@@ -21,6 +21,8 @@ package /*${java-package}*/;
import org.apache.causeway.applib.annotation.Action;
import org.apache.causeway.applib.annotation.SemanticsOf;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.RequiredArgsConstructor;
/*${generated-file-notice}*/
@@ -31,7 +33,7 @@ public class /*${showcase-name}*/Holder_actionReturning {
private final /*${showcase-name}*/Holder holder;
- public /*${showcase-type}*/ act() {
+ public /*${showcase-simple-type}*/ act() {
return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
index 9cbb650af3..c95af4779c 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
@@ -24,6 +24,8 @@ import org.apache.causeway.applib.annotation.Action;
import org.apache.causeway.applib.annotation.SemanticsOf;
import org.apache.causeway.commons.functional.IndexedConsumer;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.RequiredArgsConstructor;
import lombok.val;
@@ -37,15 +39,15 @@ public class /*${showcase-name}*/Holder_actionReturningArray {
private final /*${showcase-name}*/Holder holder;
- public /*${showcase-type}*/[] act() {
- val array = new /*${showcase-type}*/[(int)samples.stream().count()];
+ public /*${showcase-simple-type}*/[] act() {
+ val array = new /*${showcase-simple-type}*/[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] = value));
return array;
}
@Inject
- Samples</*${showcase-type-boxed}*/> samples;
+ Samples</*${showcase-simple-type-boxed}*/> samples;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java
index 53647da457..6072ba6309 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java
@@ -26,6 +26,8 @@ import javax.inject.Inject;
import org.apache.causeway.applib.annotation.Action;
import org.apache.causeway.applib.annotation.SemanticsOf;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.RequiredArgsConstructor;
import demoapp.dom.types.Samples;
@@ -38,13 +40,13 @@ public class /*${showcase-name}*/Holder_actionReturningCollection {
private final /*${showcase-name}*/Holder holder;
- public Collection</*${showcase-type}*/> act() {
+ public Collection</*${showcase-simple-type}*/> act() {
return samples.stream()
.collect(Collectors.toList());
}
@Inject
- Samples</*${showcase-type}*/> samples;
+ Samples</*${showcase-simple-type}*/> samples;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java
index d60df7127a..b4dd9cf126 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java
@@ -22,6 +22,8 @@ import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Where;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.RequiredArgsConstructor;
/*${generated-file-notice}*/
@@ -33,7 +35,7 @@ public class /*${showcase-name}*/Holder_mixinProperty {
private final /*${showcase-name}*/Holder holder;
- public /*${showcase-type}*/ prop() {
+ public /*${showcase-simple-type}*/ prop() {
return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalProperty.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalProperty.java
index 5752894357..8f521d4538 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalProperty.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalProperty.java
@@ -26,6 +26,8 @@ import org.apache.causeway.applib.annotation.Parameter;
import org.apache.causeway.applib.annotation.PromptStyle;
import org.apache.causeway.applib.annotation.SemanticsOf;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.RequiredArgsConstructor;
/*${generated-file-notice}*/
@@ -45,13 +47,13 @@ public class /*${showcase-name}*/Holder_updateReadOnlyOptionalProperty {
@MemberSupport public /*${showcase-name}*/Holder act(
@Parameter(optionality = Optionality.OPTIONAL) // <.>
- final /*${showcase-type}*/ newValue
+ final /*${showcase-simple-type}*/ newValue
) {
holder.setReadOnlyOptionalProperty(newValue);
return holder;
}
- @MemberSupport public /*${showcase-type}*/ default0Act() {
+ @MemberSupport public /*${showcase-simple-type}*/ default0Act() {
return holder.getReadOnlyOptionalProperty();
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalPropertyWithChoices.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalPropertyWithChoices.java
index 3e92205d7c..1d60f133fd 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalPropertyWithChoices.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalPropertyWithChoices.java
@@ -31,6 +31,8 @@ import org.apache.causeway.applib.annotation.Parameter;
import org.apache.causeway.applib.annotation.PromptStyle;
import org.apache.causeway.applib.annotation.SemanticsOf;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.RequiredArgsConstructor;
import demoapp.dom.types.Samples;
@@ -52,21 +54,21 @@ public class /*${showcase-name}*/Holder_updateReadOnlyOptionalPropertyWithChoice
@MemberSupport public /*${showcase-name}*/Holder act(
@Parameter(optionality = Optionality.OPTIONAL)
- final /*${showcase-type}*/ newValue) {
+ final /*${showcase-simple-type}*/ newValue) {
holder.setReadOnlyOptionalProperty(newValue);
return holder;
}
- @MemberSupport public /*${showcase-type}*/ default0Act() {
+ @MemberSupport public /*${showcase-simple-type}*/ default0Act() {
return holder.getReadOnlyOptionalProperty();
}
- @MemberSupport public List</*${showcase-type-boxed}*/> choices0Act() {
+ @MemberSupport public List</*${showcase-simple-type-boxed}*/> choices0Act() {
return samples.stream()
.collect(Collectors.toList());
}
@Inject
- Samples</*${showcase-type-boxed}*/> samples;
+ Samples</*${showcase-simple-type-boxed}*/> samples;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java
index 488276de40..225ea9fadb 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java
@@ -24,6 +24,8 @@ import org.apache.causeway.applib.annotation.MemberSupport;
import org.apache.causeway.applib.annotation.PromptStyle;
import org.apache.causeway.applib.annotation.SemanticsOf;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.RequiredArgsConstructor;
/*${generated-file-notice}*/
@@ -41,12 +43,12 @@ public class /*${showcase-name}*/Holder_updateReadOnlyProperty {
private final /*${showcase-name}*/Holder holder;
- @MemberSupport public /*${showcase-name}*/Holder act(final /*${showcase-type}*/ newValue) {
+ @MemberSupport public /*${showcase-name}*/Holder act(final /*${showcase-simple-type}*/ newValue) {
holder.setReadOnlyProperty(newValue);
return holder;
}
- @MemberSupport public /*${showcase-type}*/ default0Act() {
+ @MemberSupport public /*${showcase-simple-type}*/ default0Act() {
return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java
index e30e5c2746..387c2e2cea 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java
@@ -29,6 +29,8 @@ import org.apache.causeway.applib.annotation.MemberSupport;
import org.apache.causeway.applib.annotation.PromptStyle;
import org.apache.causeway.applib.annotation.SemanticsOf;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.RequiredArgsConstructor;
import demoapp.dom.types.Samples;
@@ -48,22 +50,22 @@ public class /*${showcase-name}*/Holder_updateReadOnlyPropertyWithChoices {
private final /*${showcase-name}*/Holder holder;
- @MemberSupport public /*${showcase-name}*/Holder act(final /*${showcase-type}*/ newValue) {
+ @MemberSupport public /*${showcase-name}*/Holder act(final /*${showcase-simple-type}*/ newValue) {
holder.setReadOnlyProperty(newValue);
return holder;
}
- @MemberSupport public /*${showcase-type}*/ default0Act() {
+ @MemberSupport public /*${showcase-simple-type}*/ default0Act() {
return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
- @MemberSupport public List</*${showcase-type-boxed}*/> choices0Act() {
+ @MemberSupport public List</*${showcase-simple-type-boxed}*/> choices0Act() {
return samples.stream()
.collect(Collectors.toList());
}
@Inject
- Samples</*${showcase-type-boxed}*/> samples;
+ Samples</*${showcase-simple-type-boxed}*/> samples;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder~primitive.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder~primitive.java
index 944e02eaa8..eda920eadb 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder~primitive.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder~primitive.java
@@ -20,16 +20,18 @@ package /*${java-package}*/;
import javax.inject.Named;
+import /*${showcase-fully-qualified-type}*/;
+
/*${generated-file-notice}*/
@Named("demo./*${showcase-name}*/Holder")
//tag::class[]
public interface /*${showcase-name}*/Holder {
- /*${showcase-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
- void setReadOnlyProperty(/*${showcase-type}*/ c);
+ /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ void setReadOnlyProperty(/*${showcase-simple-type}*/ c);
- /*${showcase-type}*/ /*${showcase-type-getter-prefix}*/ReadWriteProperty();
- void setReadWriteProperty(/*${showcase-type}*/ c);
+ /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadWriteProperty();
+ void setReadWriteProperty(/*${showcase-simple-type}*/ c);
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo.java
index 970d3b15dc..85e16edb91 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo.java
@@ -34,6 +34,8 @@ import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.Getter;
import lombok.Setter;
@@ -50,35 +52,35 @@ public class /*${showcase-name}*/Jdo //
extends /*${showcase-name}*/Entity {
//end::class[]
- public /*${showcase-name}*/Jdo(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Jdo(final /*${showcase-simple-type}*/ initialValue) {
this.readOnlyProperty = initialValue;
this.readWriteProperty = initialValue;
}
//tag::class[]
- @Title(prepend = "/*${showcase-type}*/ JDO entity: ")
+ @Title(prepend = "/*${showcase-simple-type}*/ JDO entity: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
@Column(allowsNull = "false") // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyProperty;
+ private /*${showcase-simple-type}*/ readOnlyProperty;
@Property(editing = Editing.ENABLED) // <.>
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
@Column(allowsNull = "false")
@Getter @Setter
- private /*${showcase-type}*/ readWriteProperty;
+ private /*${showcase-simple-type}*/ readWriteProperty;
@Property(optionality = Optionality.OPTIONAL) // <.>
@PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
@Column(allowsNull = "true") // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyOptionalProperty;
+ private /*${showcase-simple-type}*/ readOnlyOptionalProperty;
@Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
@PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
@Column(allowsNull = "true")
@Getter @Setter
- private /*${showcase-type}*/ readWriteOptionalProperty;
+ private /*${showcase-simple-type}*/ readWriteOptionalProperty;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java
index 1c671269df..cf8126be4b 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java
@@ -21,20 +21,22 @@ package /*${java-package}*/;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
+import /*${showcase-fully-qualified-type}*/;
+
import demoapp.dom._infra.values.ValueHolderRepository;
/*${generated-file-notice}*/
@Profile("demo-jdo")
@Service
public class /*${showcase-name}*/JdoEntities
-extends ValueHolderRepository</*${showcase-type-boxed}*/, /*${showcase-name}*/Jdo> {
+extends ValueHolderRepository</*${showcase-simple-type-boxed}*/, /*${showcase-name}*/Jdo> {
protected /*${showcase-name}*/JdoEntities() {
super(/*${showcase-name}*/Jdo.class);
}
@Override
- protected /*${showcase-name}*/Jdo newDetachedEntity(/*${showcase-type-boxed}*/ value) {
+ protected /*${showcase-name}*/Jdo newDetachedEntity(/*${showcase-simple-type-boxed}*/ value) {
return new /*${showcase-name}*/Jdo(value);
}
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~lob.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~lob.java
index a9e4948e8a..b0d74b0195 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~lob.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~lob.java
@@ -35,6 +35,8 @@ import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
import org.apache.causeway.applib.annotation.Where;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.Getter;
import lombok.Setter;
@@ -51,35 +53,35 @@ public class /*${showcase-name}*/Jdo //
extends /*${showcase-name}*/Entity {
//end::class[]
- public /*${showcase-name}*/Jdo(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Jdo(final /*${showcase-simple-type}*/ initialValue) {
this.readOnlyProperty = initialValue;
this.readWriteProperty = initialValue;
}
//tag::class[]
- @Title(prepend = "/*${showcase-type}*/ JDO entity: ")
+ @Title(prepend = "/*${showcase-simple-type}*/ JDO entity: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
@Column(allowsNull = "false", jdbcType = "CLOB") // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyProperty;
+ private /*${showcase-simple-type}*/ readOnlyProperty;
@Property(editing = Editing.ENABLED) // <.>
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1", hidden = Where.ALL_TABLES, multiLine = 5)
@Column(allowsNull = "false", jdbcType = "CLOB")
@Getter @Setter
- private /*${showcase-type}*/ readWriteProperty;
+ private /*${showcase-simple-type}*/ readWriteProperty;
@Property(optionality = Optionality.OPTIONAL) // <.>
@PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
@Column(allowsNull = "true", jdbcType = "CLOB") // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyOptionalProperty;
+ private /*${showcase-simple-type}*/ readOnlyOptionalProperty;
@Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
@PropertyLayout(fieldSetId = "optional-properties", sequence = "2", hidden = Where.ALL_TABLES, multiLine = 5)
@Column(allowsNull = "true", jdbcType = "CLOB")
@Getter @Setter
- private /*${showcase-type}*/ readWriteOptionalProperty;
+ private /*${showcase-simple-type}*/ readWriteOptionalProperty;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~primitive.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~primitive.java
index 6e3246657c..46f3d13e3b 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~primitive.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~primitive.java
@@ -32,6 +32,8 @@ import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.Getter;
import lombok.Setter;
@@ -48,21 +50,21 @@ public class /*${showcase-name}*/Jdo //
extends /*${showcase-name}*/Entity {
//end::class[]
- public /*${showcase-name}*/Jdo(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Jdo(final /*${showcase-simple-type}*/ initialValue) {
this.readOnlyProperty = initialValue;
this.readWriteProperty = initialValue;
}
//tag::class[]
- @Title(prepend = "/*${showcase-type}*/ (primitive) JDO entity: ")
+ @Title(prepend = "/*${showcase-simple-type}*/ (primitive) JDO entity: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
@Getter @Setter
- private /*${showcase-type}*/ readOnlyProperty; // <.>
+ private /*${showcase-simple-type}*/ readOnlyProperty; // <.>
- @Property(editing = Editing.ENABLED)
+ @Property(editing = Editing.ENABLED)
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
@Getter @Setter
- private /*${showcase-type}*/ readWriteProperty;
+ private /*${showcase-simple-type}*/ readWriteProperty;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa.java
index 7739780393..06b2a412f2 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa.java
@@ -36,6 +36,8 @@ import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
import org.apache.causeway.persistence.jpa.applib.integration.CausewayEntityListener;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@@ -58,7 +60,7 @@ public class /*${showcase-name}*/Jpa
extends /*${showcase-name}*/Entity {
//end::class[]
- public /*${showcase-name}*/Jpa(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Jpa(final /*${showcase-simple-type}*/ initialValue) {
this.readOnlyProperty = initialValue;
this.readWriteProperty = initialValue;
}
@@ -68,29 +70,29 @@ public class /*${showcase-name}*/Jpa
@GeneratedValue
private Long id;
- @Title(prepend = "/*${showcase-type}*/ JPA entity: ")
+ @Title(prepend = "/*${showcase-simple-type}*/ JPA entity: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
@Column(nullable = false) // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyProperty;
+ private /*${showcase-simple-type}*/ readOnlyProperty;
@Property(editing = Editing.ENABLED) // <.>
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
@Column(nullable = false)
@Getter @Setter
- private /*${showcase-type}*/ readWriteProperty;
+ private /*${showcase-simple-type}*/ readWriteProperty;
@Property(optionality = Optionality.OPTIONAL) // <.>
@PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
@Column(nullable = true) // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyOptionalProperty;
+ private /*${showcase-simple-type}*/ readOnlyOptionalProperty;
@Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
@PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
@Column(nullable = true)
@Getter @Setter
- private /*${showcase-type}*/ readWriteOptionalProperty;
+ private /*${showcase-simple-type}*/ readWriteOptionalProperty;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java
index d2e694e7fa..f5ab4514f3 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java
@@ -21,20 +21,22 @@ package /*${java-package}*/;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
+import /*${showcase-fully-qualified-type}*/;
+
import demoapp.dom._infra.values.ValueHolderRepository;
/*${generated-file-notice}*/
@Profile("demo-jpa")
@Service
public class /*${showcase-name}*/JpaEntities
-extends ValueHolderRepository</*${showcase-type-boxed}*/, /*${showcase-name}*/Jpa> {
+extends ValueHolderRepository</*${showcase-simple-type-boxed}*/, /*${showcase-name}*/Jpa> {
protected /*${showcase-name}*/JpaEntities() {
super(/*${showcase-name}*/Jpa.class);
}
@Override
- protected /*${showcase-name}*/Jpa newDetachedEntity(/*${showcase-type-boxed}*/ value) {
+ protected /*${showcase-name}*/Jpa newDetachedEntity(/*${showcase-simple-type-boxed}*/ value) {
return new /*${showcase-name}*/Jpa(value);
}
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~lob.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~lob.java
index 9f371131a2..37ffe85f5f 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~lob.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~lob.java
@@ -40,6 +40,8 @@ import org.apache.causeway.applib.annotation.Title;
import org.apache.causeway.applib.annotation.Where;
import org.apache.causeway.persistence.jpa.applib.integration.CausewayEntityListener;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@@ -62,7 +64,7 @@ public class /*${showcase-name}*/Jpa
extends /*${showcase-name}*/Entity {
//end::class[]
- public /*${showcase-name}*/Jpa(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Jpa(final /*${showcase-simple-type}*/ initialValue) {
this.readOnlyProperty = initialValue;
this.readWriteProperty = initialValue;
}
@@ -72,29 +74,29 @@ public class /*${showcase-name}*/Jpa
@GeneratedValue
private Long id;
- @Title(prepend = "/*${showcase-type}*/ JPA entity: ")
+ @Title(prepend = "/*${showcase-simple-type}*/ JPA entity: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
@Column(nullable = false) @Lob @Basic(fetch=FetchType.LAZY) // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyProperty;
+ private /*${showcase-simple-type}*/ readOnlyProperty;
@Property(editing = Editing.ENABLED) // <.>
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1", hidden = Where.ALL_TABLES, multiLine = 5)
@Column(nullable = false) @Lob @Basic(fetch=FetchType.LAZY)
@Getter @Setter
- private /*${showcase-type}*/ readWriteProperty;
+ private /*${showcase-simple-type}*/ readWriteProperty;
@Property(optionality = Optionality.OPTIONAL) // <.>
@PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
@Column(nullable = true) @Lob @Basic(fetch=FetchType.LAZY) // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyOptionalProperty;
+ private /*${showcase-simple-type}*/ readOnlyOptionalProperty;
@Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
@PropertyLayout(fieldSetId = "optional-properties", sequence = "2", hidden = Where.ALL_TABLES, multiLine = 5)
@Column(nullable = true) @Lob @Basic(fetch=FetchType.LAZY)
@Getter @Setter
- private /*${showcase-type}*/ readWriteOptionalProperty;
+ private /*${showcase-simple-type}*/ readWriteOptionalProperty;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~primitive.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~primitive.java
index 5654af2ff4..261c864bcf 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~primitive.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~primitive.java
@@ -34,6 +34,8 @@ import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
import org.apache.causeway.persistence.jpa.applib.integration.CausewayEntityListener;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@@ -56,7 +58,7 @@ public class /*${showcase-name}*/Jpa
extends /*${showcase-name}*/Entity {
//end::class[]
- public /*${showcase-name}*/Jpa(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Jpa(final /*${showcase-simple-type}*/ initialValue) {
this.readOnlyProperty = initialValue;
this.readWriteProperty = initialValue;
}
@@ -66,15 +68,15 @@ public class /*${showcase-name}*/Jpa
@GeneratedValue
private Long id;
- @Title(prepend = "/*${showcase-type}*/ (primitive) JPA entity: ")
+ @Title(prepend = "/*${showcase-simple-type}*/ (primitive) JPA entity: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
@Getter @Setter
- private /*${showcase-type}*/ readOnlyProperty; // <.>
+ private /*${showcase-simple-type}*/ readOnlyProperty; // <.>
- @Property(editing = Editing.ENABLED)
+ @Property(editing = Editing.ENABLED)
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
@Getter @Setter
- private /*${showcase-type}*/ readWriteProperty;
+ private /*${showcase-simple-type}*/ readWriteProperty;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java
index 6de138a58f..a717016aaa 100644
--- a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java
+++ b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java
@@ -26,6 +26,8 @@ import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
import demoapp.dom._infra.values.ValueHolder;
import /*${showcase-java-package}*/.holder./*${showcase-name}*/Holder2;
+import /*${showcase-fully-qualified-type}*/;
+
/*${generated-file-notice}*/
@Named("demo./*${showcase-name}*/Entity") // shared permissions with concrete sub class
@DomainObject
@@ -33,10 +35,10 @@ public abstract class /*${showcase-name}*/Entity
implements
HasAsciiDocDescription,
/*${showcase-name}*/Holder2,
- ValueHolder</*${showcase-type-boxed}*/> {
+ ValueHolder</*${showcase-simple-type-boxed}*/> {
@Override
- public /*${showcase-type-boxed}*/ value() {
+ public /*${showcase-simple-type-boxed}*/ value() {
return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
}
diff --git a/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java b/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java
index d52d492e5c..6d125e8f76 100644
--- a/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java
+++ b/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java
@@ -22,6 +22,8 @@ import javax.inject.Inject;
import org.springframework.stereotype.Service;
+import /*${showcase-fully-qualified-type}*/;
+
import demoapp.dom._infra.seed.SeedServiceAbstract;
import demoapp.dom._infra.values.ValueHolderRepository;
@@ -31,7 +33,7 @@ public class /*${showcase-name}*/Seeding
extends SeedServiceAbstract {
@Inject
- public /*${showcase-name}*/Seeding(ValueHolderRepository</*${showcase-type-boxed}*/, ? extends /*${showcase-name}*/Entity> entities) {
+ public /*${showcase-name}*/Seeding(ValueHolderRepository</*${showcase-simple-type-boxed}*/, ? extends /*${showcase-name}*/Entity> entities) {
super(entities);
}
diff --git a/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java b/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java
index 464e59f423..406d066904 100644
--- a/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java
+++ b/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java
@@ -22,14 +22,16 @@ import java.util.stream.Stream;
import org.springframework.stereotype.Service;
+import /*${showcase-fully-qualified-type}*/;
+
import demoapp.dom.types.Samples;
/*${generated-file-notice}*/
@Service
-public class /*${showcase-name}*/Samples implements Samples</*${showcase-type}*/> {
+public class /*${showcase-name}*/Samples implements Samples</*${showcase-simple-type}*/> {
@Override
- public Stream</*${showcase-type}*/> stream() {
+ public Stream</*${showcase-simple-type}*/> stream() {
return new /*${showcase-value-semantics-provider}*/()
.getExamples()
.stream();
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm.java b/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
index ae1f2302be..85d53aa0ab 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
@@ -33,6 +33,8 @@ import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.Getter;
import lombok.Setter;
@@ -52,33 +54,33 @@ public class /*${showcase-name}*/Vm
implements HasAsciiDocDescription, /*${showcase-name}*/Holder2 {
//end::class[]
- public /*${showcase-name}*/Vm(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Vm(final /*${showcase-simple-type}*/ initialValue) {
this.readOnlyProperty = initialValue;
this.readWriteProperty = initialValue;
}
//tag::class[]
- @Title(prepend = "/*${showcase-type}*/ view model: ")
+ @Title(prepend = "/*${showcase-simple-type}*/ view model: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
@XmlElement(required = true) // <.>
@Getter @Setter
- private /*${showcase-type}*/ readOnlyProperty;
+ private /*${showcase-simple-type}*/ readOnlyProperty;
@Property(editing = Editing.ENABLED) // <.>
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
@XmlElement(required = true)
@Getter @Setter
- private /*${showcase-type}*/ readWriteProperty;
+ private /*${showcase-simple-type}*/ readWriteProperty;
@Property(optionality = Optionality.OPTIONAL) // <.>
@PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
@Getter @Setter
- private /*${showcase-type}*/ readOnlyOptionalProperty;
+ private /*${showcase-simple-type}*/ readOnlyOptionalProperty;
@Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
@PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
@Getter @Setter
- private /*${showcase-type}*/ readWriteOptionalProperty;
+ private /*${showcase-simple-type}*/ readWriteOptionalProperty;
}
//end::class[]
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.java b/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.java
index 64fd3a2a4e..134c73676b 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.java
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.java
@@ -31,6 +31,8 @@ import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
+import /*${showcase-fully-qualified-type}*/;
+
import lombok.Getter;
import lombok.Setter;
@@ -50,21 +52,21 @@ public class /*${showcase-name}*/Vm
implements HasAsciiDocDescription, /*${showcase-name}*/Holder2 {
//end::class[]
- public /*${showcase-name}*/Vm(final /*${showcase-type}*/ initialValue) {
+ public /*${showcase-name}*/Vm(final /*${showcase-simple-type}*/ initialValue) {
this.readOnlyProperty = initialValue;
this.readWriteProperty = initialValue;
}
//tag::class[]
- @Title(prepend = "/*${showcase-type}*/ (primitive) view model: ")
+ @Title(prepend = "/*${showcase-simple-type}*/ (primitive) view model: ")
@PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
@Getter @Setter
- private /*${showcase-type}*/ readOnlyProperty; // <.>
+ private /*${showcase-simple-type}*/ readOnlyProperty; // <.>
- @Property(editing = Editing.ENABLED)
+ @Property(editing = Editing.ENABLED)
@PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
@Getter @Setter
- private /*${showcase-type}*/ readWriteProperty;
+ private /*${showcase-simple-type}*/ readWriteProperty;
}
//end::class[]
[causeway] 06/08: CAUSEWAY-2485 : updates templates
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit ab4af890a6b1592c65bf61e5ddcff394dcc7a7c4
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu May 18 07:20:39 2023 +0100
CAUSEWAY-2485 : updates templates
---
.../org/apache/causeway/commons/io/FileUtils.java | 17 ++++++
.../demoshowcases/value/ValueShowCase.java | 13 ++++-
.../demoshowcases/value/ValueTypeGenTemplate.java | 60 ++++++++++++++++++++--
.../src/main/resources/$Templates-common.adoc | 2 -
.../resources/$Templates-common~primitive.adoc | 2 -
.../src/main/resources/$Templates-description.adoc | 8 ++-
.../$Templates-description~primitive.adoc | 2 -
.../metaprog/src/main/resources/$Templates.java | 1 -
.../src/main/resources/$Templates.layout.xml | 2 -
.../{$Templates.java => $Templates~primitive.java} | 3 --
.../src/main/resources/holder/$TemplateHolder.java | 1 -
.../main/resources/holder/$TemplateHolder2.java | 17 +++---
...older2.java => $TemplateHolder2~primitive.java} | 18 +++----
.../holder/$TemplateHolder_actionReturning.java | 3 +-
.../$TemplateHolder_actionReturningArray.java | 1 -
...lateHolder_actionReturningArray~primitive.java} | 3 --
.../$TemplateHolder_actionReturningCollection.java | 1 -
...older_actionReturningCollection~primitive.java} | 3 --
...$TemplateHolder_actionReturning~primitive.java} | 5 +-
.../holder/$TemplateHolder_mixinProperty.java | 3 +-
...> $TemplateHolder_mixinProperty~primitive.java} | 5 +-
...plateHolder_updateReadOnlyOptionalProperty.java | 1 -
..._updateReadOnlyOptionalPropertyWithChoices.java | 1 -
.../$TemplateHolder_updateReadOnlyProperty.java | 3 +-
...teHolder_updateReadOnlyPropertyWithChoices.java | 3 +-
...dateReadOnlyPropertyWithChoices~primitive.java} | 5 +-
...teHolder_updateReadOnlyProperty~primitive.java} | 5 +-
.../holder/$TemplateHolder~primitive.java | 7 +--
.../resources/jdo/$TemplateJdo-description.adoc | 4 +-
.../jdo/$TemplateJdo-description~primitive.adoc | 4 +-
.../src/main/resources/jdo/$TemplateJdo.java | 1 -
.../main/resources/jdo/$TemplateJdoEntities.java | 1 -
...es.java => $TemplateJdoEntities~primitive.java} | 3 --
.../src/main/resources/jdo/$TemplateJdo~lob.java | 1 -
.../main/resources/jdo/$TemplateJdo~primitive.java | 3 --
.../resources/jpa/$TemplateJpa-description.adoc | 4 +-
.../jpa/$TemplateJpa-description~primitive.adoc | 4 +-
.../src/main/resources/jpa/$TemplateJpa.java | 1 -
.../main/resources/jpa/$TemplateJpaEntities.java | 1 -
...es.java => $TemplateJpaEntities~primitive.java} | 3 --
.../src/main/resources/jpa/$TemplateJpa~lob.java | 1 -
.../main/resources/jpa/$TemplateJpa~primitive.java | 3 --
.../resources/persistence/$TemplateEntity.java | 3 +-
.../persistence/$TemplateEntity.layout.xml | 2 -
...eEntity.java => $TemplateEntity~primitive.java} | 5 +-
.../$TemplateEntity~primitive.layout.xml | 2 -
.../resources/persistence/$TemplateSeeding.java | 1 -
...eeding.java => $TemplateSeeding~primitive.java} | 3 --
.../main/resources/samples/$TemplateSamples.java | 1 -
...amples.java => $TemplateSamples~primitive.java} | 3 --
.../main/resources/vm/$TemplateVm-description.adoc | 4 +-
.../vm/$TemplateVm-description~primitive.adoc | 4 +-
.../src/main/resources/vm/$TemplateVm.java | 1 -
.../src/main/resources/vm/$TemplateVm.layout.xml | 2 -
.../main/resources/vm/$TemplateVm~primitive.java | 3 --
.../resources/vm/$TemplateVm~primitive.layout.xml | 2 -
.../value/ValueTypeGenTemplateTest.java | 6 ++-
57 files changed, 125 insertions(+), 146 deletions(-)
diff --git a/commons/src/main/java/org/apache/causeway/commons/io/FileUtils.java b/commons/src/main/java/org/apache/causeway/commons/io/FileUtils.java
index 89f345661c..f4f21f84d7 100644
--- a/commons/src/main/java/org/apache/causeway/commons/io/FileUtils.java
+++ b/commons/src/main/java/org/apache/causeway/commons/io/FileUtils.java
@@ -18,8 +18,12 @@
*/
package org.apache.causeway.commons.io;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.DirectoryStream;
@@ -305,4 +309,17 @@ public class FileUtils {
Files.copy(from.toPath(), to.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
+ @SneakyThrows
+ public void copyWithCrlf(final @NonNull File from, final @NonNull File to) {
+ try (final BufferedReader reader = new BufferedReader(new FileReader(from));
+ final BufferedWriter writer = new BufferedWriter(new FileWriter(to))) {
+
+ String line;
+ while ((line = reader.readLine()) != null) {
+ // Append CRLF line endings to each line
+ writer.write(line + "\r\n");
+ }
+ }
+ }
+
}
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
index f942e1d1e5..dfd9a63d62 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
@@ -35,12 +35,18 @@ public enum ValueShowCase {
.javaPackage("demoapp.dom.types.causeway.blobs")
.showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Blob")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BlobValueSemantics")
+ .description("binary large objects")
+ .causewaySpecific(true)
+ .excludeJdoJpa(true)
.templateVariant(TemplateVariant.LOB)),
CLOB(Config.builder()
.showcaseName("CausewayClob")
.javaPackage("demoapp.dom.types.causeway.clobs")
.showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Clob")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ClobValueSemantics")
+ .description("character large objects")
+ .causewaySpecific(true)
+ .excludeJdoJpa(true)
.templateVariant(TemplateVariant.LOB)),
LOCALRESOURCEPATH(Config.builder()
.showcaseName("CausewayLocalResourcePath")
@@ -53,6 +59,9 @@ public enum ValueShowCase {
.javaPackage("demoapp.dom.types.causeway.passwords")
.showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Password")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.PasswordValueSemantics")
+ .description("strings that are automatically masked as passwords")
+ .causewaySpecific(true)
+ .excludeJaxb(true)
.templateVariant(TemplateVariant.DEFAULT)),
TREENODE(Config.builder()
.showcaseName("CausewayTreeNode")
@@ -69,7 +78,7 @@ public enum ValueShowCase {
JAVAAWTBUFFEREDIMAGE(Config.builder()
.showcaseName("BufferedImage")
.javaPackage("demoapp.dom.types.javaawt.images")
- .showcaseValueFullyQualifiedType("java.awt.BufferedImage")
+ .showcaseValueFullyQualifiedType("java.awt.image.BufferedImage")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BufferedImageValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JAVAMATHBIGDECIMAL(Config.builder()
@@ -142,7 +151,7 @@ public enum ValueShowCase {
.showcaseName("JavaUtilDate")
.javaPackage("demoapp.dom.types.javautil.javautildate")
.showcaseValueFullyQualifiedType("java.util.Date")
- .showcaseValueSemantics("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEventSemantics")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaUtilDateValueSemantics")
.templateVariant(TemplateVariant.DEFAULT)),
JODADATETIME(Config.builder()
.showcaseName("JodaDateTime")
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
index a522433ef8..035add04f2 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
@@ -39,6 +39,7 @@ import lombok.Builder;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Singular;
+import lombok.SneakyThrows;
import lombok.Value;
import lombok.val;
@@ -49,17 +50,56 @@ public class ValueTypeGenTemplate {
public static class Config {
final File outputRootDir;
final String showcaseName;
+ /**
+ * If set, then the template files in the `jdo` and `jpa` packages are NOT generated.
+ * This is to accommodate data types such as Blob and Clob that need custom treatment.
+ */
+ final boolean excludeJdoJpa;
+ /**
+ * If set, then the template files in the `jaxb` package is NOT generated.
+ * This is to accommodate data types such as Password that need custom treatment.
+ */
+ final boolean excludeJaxb;
+ /**
+ * If present, is used within the first sentence.
+ */
+ final String description;
+ /**
+ * If present, adds a NOTE: ... and also changes what {@link #getJdoTypeSupportNotice()}, {@link #getJpaTypeSupportNotice()} and {@link #getJaxbTypeSupportNotice()} returns.
+ */
+ final boolean causewaySpecific;
final String showcaseValueFullyQualifiedType;
final String showcaseValueSemantics;
@Builder.Default
final String jdoTypeSupportNotice =
"JDO supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
+
+ public String getJdoTypeSupportNotice() {
+ return causewaySpecific
+ ? "Apache Causeway provides its own implementation of the relevant JDO extension points for the `" + getShowcaseValueSimpleType() + "` value type, meaning that JDO can persist properties of this value type without further configuration."
+ : jdoTypeSupportNotice;
+ }
+
@Builder.Default
final String jpaTypeSupportNotice =
"JPA supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
+
+ public String getJpaTypeSupportNotice() {
+ return causewaySpecific
+ ? "Apache Causeway provides its own implementation of the relevant JPA extension points for the `" + getShowcaseValueSimpleType() + "` value type, meaning that JPA can persist properties of this value type without further configuration."
+ : jpaTypeSupportNotice;
+ }
+
@Builder.Default
final String jaxbTypeSupportNotice =
"JAXB supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
+
+ public String getJaxbTypeSupportNotice() {
+ return causewaySpecific
+ ? "Apache Causeway provides its own implementation of `@XmlJavaTypeAdapter` for the `" + getShowcaseValueSimpleType() + "` value type, meaning that JAXB can serialize properties of this value type without further configuration."
+ : jaxbTypeSupportNotice;
+ }
+
final String javaPackage;
@Builder.Default
final String fileNamePlaceholderForShowcaseName = "$Template";
@@ -215,11 +255,21 @@ public class ValueTypeGenTemplate {
final Config config;
+ @SneakyThrows
public void generate(final Consumer<File> onSourceGenerated) {
for(var template: config.getTemplates()) {
val templateFile = template.templateFile(config);
+ String templateFilePath = templateFile.getCanonicalPath();
+ if (config.isExcludeJdoJpa() &&
+ (templateFilePath.contains("jdo") || templateFilePath.contains("jpa"))) {
+ continue;
+ }
+ if (config.isExcludeJaxb() &&
+ templateFilePath.contains("jaxb")) {
+ continue;
+ }
val genTarget = template.outputFile(config);
@@ -227,13 +277,15 @@ public class ValueTypeGenTemplate {
templateVars.putAll(config.templateVariables);
templateVars.put("java-package", template.javaPackage(config));
templateVars.put("showcase-name", config.showcaseName);
+ templateVars.put("showcase-description", (config.getDescription() != null ? config.getDescription() + ", using" : ""));
+ templateVars.put("showcase-note-if-causeway-specific", (config.isCausewaySpecific() ? "NOTE: This is an Apache Causeway specific data type.\n\n": ""));
templateVars.put("showcase-simple-type", config.getShowcaseValueSimpleType());
templateVars.put("showcase-fully-qualified-type", config.showcaseValueFullyQualifiedType);
templateVars.put("showcase-simple-type-boxed",
Optional.ofNullable(ClassUtils.resolvePrimitiveClassName(config.showcaseValueFullyQualifiedType))
.map(ClassUtils::resolvePrimitiveIfNecessary)
.map(Class::getName)
- .orElse(config.showcaseValueFullyQualifiedType));
+ .orElse(config.getShowcaseValueSimpleType()));
templateVars.put("showcase-simple-type-getter-prefix",
Optional.ofNullable(ClassUtils.resolvePrimitiveClassName(config.showcaseValueFullyQualifiedType))
@@ -244,9 +296,9 @@ public class ValueTypeGenTemplate {
templateVars.put("showcase-value-semantics-provider", config.showcaseValueSemantics);
templateVars.put("generated-file-notice", template.generator.formatAsComment(config.generatedFileNotice));
- templateVars.put("jdo-type-support-notice", config.jdoTypeSupportNotice);
- templateVars.put("jpa-type-support-notice", config.jpaTypeSupportNotice);
- templateVars.put("jaxb-type-support-notice", config.jaxbTypeSupportNotice);
+ templateVars.put("jdo-type-support-notice", config.getJdoTypeSupportNotice());
+ templateVars.put("jpa-type-support-notice", config.getJpaTypeSupportNotice());
+ templateVars.put("jaxb-type-support-notice", config.getJaxbTypeSupportNotice());
// allow for ADOC IDE tools, to properly resolve include statements,
diff --git a/tooling/metaprog/src/main/resources/$Templates-common.adoc b/tooling/metaprog/src/main/resources/$Templates-common.adoc
index b62f77449c..438571b6ff 100644
--- a/tooling/metaprog/src/main/resources/$Templates-common.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-common.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
== Mixin actions
A number of mixin actions contribute through the `#{showcase-name}Holder` interface, demonstrate the use of `#{showcase-simple-type}` as a parameter and as a return type.
diff --git a/tooling/metaprog/src/main/resources/$Templates-common~primitive.adoc b/tooling/metaprog/src/main/resources/$Templates-common~primitive.adoc
index 3fd411afd2..e7b1173085 100644
--- a/tooling/metaprog/src/main/resources/$Templates-common~primitive.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-common~primitive.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
== Mixin actions
A number of mixin actions contribute through the `#{showcase-name}Holder` interface, demonstrate the use of `#{showcase-simple-type}` as a parameter and as a return type.
diff --git a/tooling/metaprog/src/main/resources/$Templates-description.adoc b/tooling/metaprog/src/main/resources/$Templates-description.adoc
index c8ce1f963a..756564d374 100644
--- a/tooling/metaprog/src/main/resources/$Templates-description.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-description.adoc
@@ -1,11 +1,9 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
-The framework has built-in support for the `#{showcase-simple-type}` data type.
+The framework has built-in support for #{showcase-description} the `#{showcase-simple-type}` data type.
These can be used either in entities or view models.
-== How this demo works
+#{showcase-note-if-causeway-specific}== How this demo works
On the left hand side is a collection of entities that uses the `#{showcase-simple-type}` datatype.
There is also an action that opens a view model; this view model also uses the `#{showcase-simple-type}` datatype.
@@ -25,4 +23,4 @@ include::holder/#{showcase-name}Holder.java[tags=class]
* The `#{showcase-name}Holder2` interface is used to demonstrate support for label positions using `@PropertyLayout(labelPosition=...)`.
-
+Further details, along with the effect of this annotation, can be seen on the entity and view model object pages.
diff --git a/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc b/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
index 05068f3cd7..406ce0524b 100644
--- a/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
The framework has built-in support for the (primitive) `#{showcase-simple-type}` data type.
These can be used either in entities or view models.
diff --git a/tooling/metaprog/src/main/resources/$Templates.java b/tooling/metaprog/src/main/resources/$Templates.java
index 4829d3ec86..3a7cf00483 100644
--- a/tooling/metaprog/src/main/resources/$Templates.java
+++ b/tooling/metaprog/src/main/resources/$Templates.java
@@ -47,7 +47,6 @@ import demoapp.dom.types.Samples;
import /*${showcase-java-package}*/.persistence./*${showcase-name}*/Entity;
import /*${showcase-java-package}*/.vm./*${showcase-name}*/Vm;
-/*${generated-file-notice}*/
@XmlRootElement(name = "Demo")
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
diff --git a/tooling/metaprog/src/main/resources/$Templates.layout.xml b/tooling/metaprog/src/main/resources/$Templates.layout.xml
index 234efaca1c..671874816c 100644
--- a/tooling/metaprog/src/main/resources/$Templates.layout.xml
+++ b/tooling/metaprog/src/main/resources/$Templates.layout.xml
@@ -15,8 +15,6 @@
xmlns:cpt="https://causeway.apache.org/applib/layout/component"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <!--${generated-file-notice}-->
-
<bs3:row>
<bs3:col span="10" unreferencedActions="true">
<cpt:domainObject />
diff --git a/tooling/metaprog/src/main/resources/$Templates.java b/tooling/metaprog/src/main/resources/$Templates~primitive.java
similarity index 97%
copy from tooling/metaprog/src/main/resources/$Templates.java
copy to tooling/metaprog/src/main/resources/$Templates~primitive.java
index 4829d3ec86..4281037226 100644
--- a/tooling/metaprog/src/main/resources/$Templates.java
+++ b/tooling/metaprog/src/main/resources/$Templates~primitive.java
@@ -39,15 +39,12 @@ import org.apache.causeway.applib.annotation.ObjectSupport;
import org.apache.causeway.applib.annotation.PromptStyle;
import org.apache.causeway.applib.annotation.SemanticsOf;
-import /*${showcase-fully-qualified-type}*/;
-
import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
import demoapp.dom._infra.values.ValueHolderRepository;
import demoapp.dom.types.Samples;
import /*${showcase-java-package}*/.persistence./*${showcase-name}*/Entity;
import /*${showcase-java-package}*/.vm./*${showcase-name}*/Vm;
-/*${generated-file-notice}*/
@XmlRootElement(name = "Demo")
@XmlType
@XmlAccessorType(XmlAccessType.FIELD)
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder.java
index c00b4263ab..b5ea49fcef 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder.java
@@ -22,7 +22,6 @@ import javax.inject.Named;
import /*${showcase-fully-qualified-type}*/;
-/*${generated-file-notice}*/
@Named("demo./*${showcase-name}*/Holder")
//tag::class[]
public interface /*${showcase-name}*/Holder {
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java
index 63eba1b856..162e691b78 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java
@@ -24,7 +24,6 @@ import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Where;
import /*${showcase-fully-qualified-type}*/;
-/*${generated-file-notice}*/
//tag::class[]
public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder {
@@ -35,8 +34,8 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=LEFT)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "1") // <.>
- default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionLeft() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ default /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionLeft() {
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
@Property
@@ -46,8 +45,8 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=TOP)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "2")
- default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionTop() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ default /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionTop() {
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
@Property
@@ -57,8 +56,8 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=RIGHT)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "3")
- default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionRight() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ default /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionRight() {
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
@Property
@@ -68,8 +67,8 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=NONE)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "4")
- default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionNone() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ default /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionNone() {
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder2~primitive.java
similarity index 74%
copy from tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java
copy to tooling/metaprog/src/main/resources/holder/$TemplateHolder2~primitive.java
index 63eba1b856..1b0ab383b6 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder2.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder2~primitive.java
@@ -22,9 +22,7 @@ import org.apache.causeway.applib.annotation.LabelPosition;
import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Where;
-import /*${showcase-fully-qualified-type}*/;
-/*${generated-file-notice}*/
//tag::class[]
public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder {
@@ -35,8 +33,8 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=LEFT)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "1") // <.>
- default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionLeft() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ default /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionLeft() {
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
@Property
@@ -46,8 +44,8 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=TOP)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "2")
- default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionTop() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ default /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionTop() {
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
@Property
@@ -57,8 +55,8 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=RIGHT)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "3")
- default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionRight() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ default /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionRight() {
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
@Property
@@ -68,8 +66,8 @@ public interface /*${showcase-name}*/Holder2 extends /*${showcase-name}*/Holder
"@PropertyLayout(labelPosition=NONE)",
hidden = Where.ALL_TABLES,
fieldSetId = "label-positions", sequence = "4")
- default /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionNone() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ default /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyPropertyDerivedLabelPositionNone() {
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java
index bce9d846fb..42d7882910 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java
@@ -25,7 +25,6 @@ import /*${showcase-fully-qualified-type}*/;
import lombok.RequiredArgsConstructor;
-/*${generated-file-notice}*/
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@RequiredArgsConstructor
@@ -34,7 +33,7 @@ public class /*${showcase-name}*/Holder_actionReturning {
private final /*${showcase-name}*/Holder holder;
public /*${showcase-simple-type}*/ act() {
- return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return holder./*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
index c95af4779c..5d7079f953 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
@@ -31,7 +31,6 @@ import lombok.val;
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@RequiredArgsConstructor
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray~primitive.java
similarity index 95%
copy from tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
copy to tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray~primitive.java
index c95af4779c..511ac2e384 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningArray~primitive.java
@@ -24,14 +24,11 @@ import org.apache.causeway.applib.annotation.Action;
import org.apache.causeway.applib.annotation.SemanticsOf;
import org.apache.causeway.commons.functional.IndexedConsumer;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.RequiredArgsConstructor;
import lombok.val;
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@RequiredArgsConstructor
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java
index 6072ba6309..2f3de074aa 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java
@@ -32,7 +32,6 @@ import lombok.RequiredArgsConstructor;
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@RequiredArgsConstructor
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection~primitive.java
similarity index 95%
copy from tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java
copy to tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection~primitive.java
index 6072ba6309..c373a7646a 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturningCollection~primitive.java
@@ -26,13 +26,10 @@ import javax.inject.Inject;
import org.apache.causeway.applib.annotation.Action;
import org.apache.causeway.applib.annotation.SemanticsOf;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.RequiredArgsConstructor;
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@RequiredArgsConstructor
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning~primitive.java
similarity index 89%
copy from tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java
copy to tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning~primitive.java
index bce9d846fb..00f048bf50 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_actionReturning~primitive.java
@@ -21,11 +21,8 @@ package /*${java-package}*/;
import org.apache.causeway.applib.annotation.Action;
import org.apache.causeway.applib.annotation.SemanticsOf;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.RequiredArgsConstructor;
-/*${generated-file-notice}*/
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@RequiredArgsConstructor
@@ -34,7 +31,7 @@ public class /*${showcase-name}*/Holder_actionReturning {
private final /*${showcase-name}*/Holder holder;
public /*${showcase-simple-type}*/ act() {
- return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return holder./*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java
index b4dd9cf126..9cfe46725f 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java
@@ -26,7 +26,6 @@ import /*${showcase-fully-qualified-type}*/;
import lombok.RequiredArgsConstructor;
-/*${generated-file-notice}*/
//tag::class[]
@Property()
@PropertyLayout(hidden = Where.ALL_TABLES, fieldSetId = "contributed", sequence = "1")
@@ -36,7 +35,7 @@ public class /*${showcase-name}*/Holder_mixinProperty {
private final /*${showcase-name}*/Holder holder;
public /*${showcase-simple-type}*/ prop() {
- return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return holder./*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty~primitive.java
similarity index 90%
copy from tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java
copy to tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty~primitive.java
index b4dd9cf126..5679a4c848 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_mixinProperty~primitive.java
@@ -22,11 +22,8 @@ import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Where;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.RequiredArgsConstructor;
-/*${generated-file-notice}*/
//tag::class[]
@Property()
@PropertyLayout(hidden = Where.ALL_TABLES, fieldSetId = "contributed", sequence = "1")
@@ -36,7 +33,7 @@ public class /*${showcase-name}*/Holder_mixinProperty {
private final /*${showcase-name}*/Holder holder;
public /*${showcase-simple-type}*/ prop() {
- return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return holder./*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalProperty.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalProperty.java
index 8f521d4538..642a42ddb1 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalProperty.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalProperty.java
@@ -30,7 +30,6 @@ import /*${showcase-fully-qualified-type}*/;
import lombok.RequiredArgsConstructor;
-/*${generated-file-notice}*/
//tag::class[]
@Action(
semantics = SemanticsOf.IDEMPOTENT
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalPropertyWithChoices.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalPropertyWithChoices.java
index 1d60f133fd..a2f17c110b 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalPropertyWithChoices.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyOptionalPropertyWithChoices.java
@@ -37,7 +37,6 @@ import lombok.RequiredArgsConstructor;
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
//tag::class[]
@Action(
semantics = SemanticsOf.IDEMPOTENT
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java
index 225ea9fadb..6002eebbc6 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java
@@ -28,7 +28,6 @@ import /*${showcase-fully-qualified-type}*/;
import lombok.RequiredArgsConstructor;
-/*${generated-file-notice}*/
//tag::class[]
@Action(
semantics = SemanticsOf.IDEMPOTENT
@@ -49,7 +48,7 @@ public class /*${showcase-name}*/Holder_updateReadOnlyProperty {
}
@MemberSupport public /*${showcase-simple-type}*/ default0Act() {
- return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return holder./*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java
index 387c2e2cea..76bcf8b001 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java
@@ -35,7 +35,6 @@ import lombok.RequiredArgsConstructor;
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
//tag::class[]
@Action(
semantics = SemanticsOf.IDEMPOTENT
@@ -56,7 +55,7 @@ public class /*${showcase-name}*/Holder_updateReadOnlyPropertyWithChoices {
}
@MemberSupport public /*${showcase-simple-type}*/ default0Act() {
- return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return holder./*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
@MemberSupport public List</*${showcase-simple-type-boxed}*/> choices0Act() {
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices~primitive.java
similarity index 93%
copy from tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java
copy to tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices~primitive.java
index 387c2e2cea..88951fe435 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyPropertyWithChoices~primitive.java
@@ -29,13 +29,10 @@ import org.apache.causeway.applib.annotation.MemberSupport;
import org.apache.causeway.applib.annotation.PromptStyle;
import org.apache.causeway.applib.annotation.SemanticsOf;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.RequiredArgsConstructor;
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
//tag::class[]
@Action(
semantics = SemanticsOf.IDEMPOTENT
@@ -56,7 +53,7 @@ public class /*${showcase-name}*/Holder_updateReadOnlyPropertyWithChoices {
}
@MemberSupport public /*${showcase-simple-type}*/ default0Act() {
- return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return holder./*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
@MemberSupport public List</*${showcase-simple-type-boxed}*/> choices0Act() {
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty~primitive.java
similarity index 92%
copy from tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java
copy to tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty~primitive.java
index 225ea9fadb..ec9e1bb752 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder_updateReadOnlyProperty~primitive.java
@@ -24,11 +24,8 @@ import org.apache.causeway.applib.annotation.MemberSupport;
import org.apache.causeway.applib.annotation.PromptStyle;
import org.apache.causeway.applib.annotation.SemanticsOf;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.RequiredArgsConstructor;
-/*${generated-file-notice}*/
//tag::class[]
@Action(
semantics = SemanticsOf.IDEMPOTENT
@@ -49,7 +46,7 @@ public class /*${showcase-name}*/Holder_updateReadOnlyProperty {
}
@MemberSupport public /*${showcase-simple-type}*/ default0Act() {
- return holder./*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return holder./*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/holder/$TemplateHolder~primitive.java b/tooling/metaprog/src/main/resources/holder/$TemplateHolder~primitive.java
index eda920eadb..3baf1f301d 100644
--- a/tooling/metaprog/src/main/resources/holder/$TemplateHolder~primitive.java
+++ b/tooling/metaprog/src/main/resources/holder/$TemplateHolder~primitive.java
@@ -20,17 +20,14 @@ package /*${java-package}*/;
import javax.inject.Named;
-import /*${showcase-fully-qualified-type}*/;
-
-/*${generated-file-notice}*/
@Named("demo./*${showcase-name}*/Holder")
//tag::class[]
public interface /*${showcase-name}*/Holder {
- /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
void setReadOnlyProperty(/*${showcase-simple-type}*/ c);
- /*${showcase-simple-type}*/ /*${showcase-type-getter-prefix}*/ReadWriteProperty();
+ /*${showcase-simple-type}*/ /*${showcase-simple-type-getter-prefix}*/ReadWriteProperty();
void setReadWriteProperty(/*${showcase-simple-type}*/ c);
}
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo-description.adoc b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo-description.adoc
index 2e13e63845..fd39a55b84 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo-description.adoc
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo-description.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
#{jdo-type-support-notice}
[source,java]
@@ -17,4 +15,4 @@ Apache Causeway assumes properties are mandatory, so no additional annotation is
<.> optional property as defined to JDO/DataNucleus
-include::../$Templates-common.adoc[]
\ No newline at end of file
+include::../$Templates-common.adoc[]
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo-description~primitive.adoc b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo-description~primitive.adoc
index 25a4dc18f6..d740e6a69c 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo-description~primitive.adoc
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo-description~primitive.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
#{jdo-type-support-notice}
[source,java]
@@ -12,4 +10,4 @@ include::$TemplateJdo~primitive.java[tags=class]
<.> no additional JDO annotations required.
-include::../$Templates-common.adoc[]
\ No newline at end of file
+include::../$Templates-common.adoc[]
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo.java
index 85e16edb91..5c0f9b9133 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo.java
@@ -41,7 +41,6 @@ import lombok.Setter;
import /*${showcase-java-package}*/.persistence./*${showcase-name}*/Entity;
-/*${generated-file-notice}*/
@Profile("demo-jdo")
//tag::class[]
@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java
index cf8126be4b..6712cedbe0 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java
@@ -25,7 +25,6 @@ import /*${showcase-fully-qualified-type}*/;
import demoapp.dom._infra.values.ValueHolderRepository;
-/*${generated-file-notice}*/
@Profile("demo-jdo")
@Service
public class /*${showcase-name}*/JdoEntities
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities~primitive.java
similarity index 95%
copy from tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java
copy to tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities~primitive.java
index cf8126be4b..edd3dd4d61 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdoEntities~primitive.java
@@ -21,11 +21,8 @@ package /*${java-package}*/;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
-import /*${showcase-fully-qualified-type}*/;
-
import demoapp.dom._infra.values.ValueHolderRepository;
-/*${generated-file-notice}*/
@Profile("demo-jdo")
@Service
public class /*${showcase-name}*/JdoEntities
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~lob.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~lob.java
index b0d74b0195..12d3e85ace 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~lob.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~lob.java
@@ -42,7 +42,6 @@ import lombok.Setter;
import /*${showcase-java-package}*/.persistence./*${showcase-name}*/Entity;
-/*${generated-file-notice}*/
@Profile("demo-jdo")
//tag::class[]
@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
diff --git a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~primitive.java b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~primitive.java
index 46f3d13e3b..f17dc4ae63 100644
--- a/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~primitive.java
+++ b/tooling/metaprog/src/main/resources/jdo/$TemplateJdo~primitive.java
@@ -32,14 +32,11 @@ import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.Getter;
import lombok.Setter;
import /*${showcase-java-package}*/.persistence./*${showcase-name}*/Entity;
-/*${generated-file-notice}*/
@Profile("demo-jdo")
//tag::class[]
@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa-description.adoc b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa-description.adoc
index 4b00558197..d8ca526bad 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa-description.adoc
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa-description.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
#{jpa-type-support-notice}
[source,java]
@@ -17,4 +15,4 @@ Apache Causeway assumes properties are mandatory, so no additional annotation is
<.> optional property as defined to JPA
-include::../$Templates-common.adoc[]
\ No newline at end of file
+include::../$Templates-common.adoc[]
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa-description~primitive.adoc b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa-description~primitive.adoc
index 8a83592a5d..9e2df76b0e 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa-description~primitive.adoc
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa-description~primitive.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
#{jpa-type-support-notice}
[source,java]
@@ -12,4 +10,4 @@ include::$TemplateJpa~primitive.java[tags=class]
<.> no additional JPA annotations required.
-include::../$Templates-common.adoc[]
\ No newline at end of file
+include::../$Templates-common.adoc[]
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa.java
index 06b2a412f2..1b2658f7d3 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa.java
@@ -44,7 +44,6 @@ import lombok.Setter;
import /*${showcase-java-package}*/.persistence./*${showcase-name}*/Entity;
-/*${generated-file-notice}*/
@Profile("demo-jpa")
//tag::class[]
@Entity
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java
index f5ab4514f3..b33f9597c0 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java
@@ -25,7 +25,6 @@ import /*${showcase-fully-qualified-type}*/;
import demoapp.dom._infra.values.ValueHolderRepository;
-/*${generated-file-notice}*/
@Profile("demo-jpa")
@Service
public class /*${showcase-name}*/JpaEntities
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities~primitive.java
similarity index 95%
copy from tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java
copy to tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities~primitive.java
index f5ab4514f3..016b69edcf 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpaEntities~primitive.java
@@ -21,11 +21,8 @@ package /*${java-package}*/;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
-import /*${showcase-fully-qualified-type}*/;
-
import demoapp.dom._infra.values.ValueHolderRepository;
-/*${generated-file-notice}*/
@Profile("demo-jpa")
@Service
public class /*${showcase-name}*/JpaEntities
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~lob.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~lob.java
index 37ffe85f5f..9662d75c4f 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~lob.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~lob.java
@@ -48,7 +48,6 @@ import lombok.Setter;
import /*${showcase-java-package}*/.persistence./*${showcase-name}*/Entity;
-/*${generated-file-notice}*/
@Profile("demo-jpa")
//tag::class[]
@Entity
diff --git a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~primitive.java b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~primitive.java
index 261c864bcf..e5b28c2fd6 100644
--- a/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~primitive.java
+++ b/tooling/metaprog/src/main/resources/jpa/$TemplateJpa~primitive.java
@@ -34,15 +34,12 @@ import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
import org.apache.causeway.persistence.jpa.applib.integration.CausewayEntityListener;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import /*${showcase-java-package}*/.persistence./*${showcase-name}*/Entity;
-/*${generated-file-notice}*/
@Profile("demo-jpa")
//tag::class[]
@Entity
diff --git a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java
index a717016aaa..7ed967766b 100644
--- a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java
+++ b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java
@@ -28,7 +28,6 @@ import /*${showcase-java-package}*/.holder./*${showcase-name}*/Holder2;
import /*${showcase-fully-qualified-type}*/;
-/*${generated-file-notice}*/
@Named("demo./*${showcase-name}*/Entity") // shared permissions with concrete sub class
@DomainObject
public abstract class /*${showcase-name}*/Entity
@@ -39,7 +38,7 @@ implements
@Override
public /*${showcase-simple-type-boxed}*/ value() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.layout.xml b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.layout.xml
index b25e69307f..e126ed4493 100644
--- a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.layout.xml
+++ b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.layout.xml
@@ -15,8 +15,6 @@
xmlns:cpt="https://causeway.apache.org/applib/layout/component"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <!--${generated-file-notice}-->
-
<bs3:row>
<bs3:col span="10" unreferencedActions="true">
<cpt:domainObject />
diff --git a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity~primitive.java
similarity index 91%
copy from tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java
copy to tooling/metaprog/src/main/resources/persistence/$TemplateEntity~primitive.java
index a717016aaa..01e35f5a08 100644
--- a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity.java
+++ b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity~primitive.java
@@ -26,9 +26,6 @@ import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
import demoapp.dom._infra.values.ValueHolder;
import /*${showcase-java-package}*/.holder./*${showcase-name}*/Holder2;
-import /*${showcase-fully-qualified-type}*/;
-
-/*${generated-file-notice}*/
@Named("demo./*${showcase-name}*/Entity") // shared permissions with concrete sub class
@DomainObject
public abstract class /*${showcase-name}*/Entity
@@ -39,7 +36,7 @@ implements
@Override
public /*${showcase-simple-type-boxed}*/ value() {
- return /*${showcase-type-getter-prefix}*/ReadOnlyProperty();
+ return /*${showcase-simple-type-getter-prefix}*/ReadOnlyProperty();
}
}
diff --git a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity~primitive.layout.xml b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity~primitive.layout.xml
index d1cda9ed42..1bd3525158 100644
--- a/tooling/metaprog/src/main/resources/persistence/$TemplateEntity~primitive.layout.xml
+++ b/tooling/metaprog/src/main/resources/persistence/$TemplateEntity~primitive.layout.xml
@@ -15,8 +15,6 @@
xmlns:cpt="https://causeway.apache.org/applib/layout/component"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <!--${generated-file-notice}-->
-
<bs3:row>
<bs3:col span="10" unreferencedActions="true">
<cpt:domainObject />
diff --git a/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java b/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java
index 6d125e8f76..34fc13a999 100644
--- a/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java
+++ b/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java
@@ -27,7 +27,6 @@ import /*${showcase-fully-qualified-type}*/;
import demoapp.dom._infra.seed.SeedServiceAbstract;
import demoapp.dom._infra.values.ValueHolderRepository;
-/*${generated-file-notice}*/
@Service
public class /*${showcase-name}*/Seeding
extends SeedServiceAbstract {
diff --git a/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java b/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding~primitive.java
similarity index 94%
copy from tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java
copy to tooling/metaprog/src/main/resources/persistence/$TemplateSeeding~primitive.java
index 6d125e8f76..a45e427e4b 100644
--- a/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding.java
+++ b/tooling/metaprog/src/main/resources/persistence/$TemplateSeeding~primitive.java
@@ -22,12 +22,9 @@ import javax.inject.Inject;
import org.springframework.stereotype.Service;
-import /*${showcase-fully-qualified-type}*/;
-
import demoapp.dom._infra.seed.SeedServiceAbstract;
import demoapp.dom._infra.values.ValueHolderRepository;
-/*${generated-file-notice}*/
@Service
public class /*${showcase-name}*/Seeding
extends SeedServiceAbstract {
diff --git a/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java b/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java
index 406d066904..d8db1ce0b0 100644
--- a/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java
+++ b/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java
@@ -26,7 +26,6 @@ import /*${showcase-fully-qualified-type}*/;
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
@Service
public class /*${showcase-name}*/Samples implements Samples</*${showcase-simple-type}*/> {
diff --git a/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java b/tooling/metaprog/src/main/resources/samples/$TemplateSamples~primitive.java
similarity index 94%
copy from tooling/metaprog/src/main/resources/samples/$TemplateSamples.java
copy to tooling/metaprog/src/main/resources/samples/$TemplateSamples~primitive.java
index 406d066904..c20ae9c940 100644
--- a/tooling/metaprog/src/main/resources/samples/$TemplateSamples.java
+++ b/tooling/metaprog/src/main/resources/samples/$TemplateSamples~primitive.java
@@ -22,11 +22,8 @@ import java.util.stream.Stream;
import org.springframework.stereotype.Service;
-import /*${showcase-fully-qualified-type}*/;
-
import demoapp.dom.types.Samples;
-/*${generated-file-notice}*/
@Service
public class /*${showcase-name}*/Samples implements Samples</*${showcase-simple-type}*/> {
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm-description.adoc b/tooling/metaprog/src/main/resources/vm/$TemplateVm-description.adoc
index b93737d8a4..e9ade36ee1 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm-description.adoc
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm-description.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
#{jaxb-type-support-notice}
[source,java]
@@ -16,4 +14,4 @@ include::$TemplateVm.java[tags=class]
This is the default for JAXB so no additional annotation required.
-include::../$Templates-common.adoc[]
\ No newline at end of file
+include::../$Templates-common.adoc[]
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm-description~primitive.adoc b/tooling/metaprog/src/main/resources/vm/$TemplateVm-description~primitive.adoc
index 3734e06350..c5f3c2e74f 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm-description~primitive.adoc
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm-description~primitive.adoc
@@ -1,7 +1,5 @@
:Notice: 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 ag [...]
-//#{generated-file-notice}
-
#{jaxb-type-support-notice}
[source,java]
@@ -11,4 +9,4 @@ include::$TemplateVm~primitive.java[tags=class]
<.> a no-arg constructor is required by JAXB
<.> no additional JAXB annotations required.
-include::../$Templates-common.adoc[]
\ No newline at end of file
+include::../$Templates-common.adoc[]
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm.java b/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
index 85d53aa0ab..be220ad1b7 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm.java
@@ -41,7 +41,6 @@ import lombok.Setter;
import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
import /*${showcase-java-package}*/.holder./*${showcase-name}*/Holder2;
-/*${generated-file-notice}*/
//tag::class[]
@XmlRootElement(name = "root")
@XmlType
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm.layout.xml b/tooling/metaprog/src/main/resources/vm/$TemplateVm.layout.xml
index 0215d651c2..1df6c2e346 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm.layout.xml
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm.layout.xml
@@ -15,8 +15,6 @@
xmlns:cpt="https://causeway.apache.org/applib/layout/component"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <!--${generated-file-notice}-->
-
<bs3:row>
<bs3:col span="10" unreferencedActions="true">
<cpt:domainObject />
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.java b/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.java
index 134c73676b..71190ce0c5 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.java
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.java
@@ -31,15 +31,12 @@ import org.apache.causeway.applib.annotation.Property;
import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.annotation.Title;
-import /*${showcase-fully-qualified-type}*/;
-
import lombok.Getter;
import lombok.Setter;
import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
import /*${showcase-java-package}*/.holder./*${showcase-name}*/Holder2;
-/*${generated-file-notice}*/
//tag::class[]
@XmlRootElement(name = "root")
@XmlType
diff --git a/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.layout.xml b/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.layout.xml
index d1cda9ed42..1bd3525158 100644
--- a/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.layout.xml
+++ b/tooling/metaprog/src/main/resources/vm/$TemplateVm~primitive.layout.xml
@@ -15,8 +15,6 @@
xmlns:cpt="https://causeway.apache.org/applib/layout/component"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <!--${generated-file-notice}-->
-
<bs3:row>
<bs3:col span="10" unreferencedActions="true">
<cpt:domainObject />
diff --git a/tooling/metaprog/src/test/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplateTest.java b/tooling/metaprog/src/test/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplateTest.java
index e68178f117..9f23c540bb 100644
--- a/tooling/metaprog/src/test/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplateTest.java
+++ b/tooling/metaprog/src/test/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplateTest.java
@@ -124,7 +124,8 @@ class ValueTypeGenTemplateTest {
generatedFiles.forEach(src->{
val dest = new File(destinationRoot, FileUtils.realtiveFileName(sourceRoot, src));
FileUtils.makeDir(dest.getParentFile());
- FileUtils.copy(src, dest);
+ FileUtils.copyWithCrlf(src, dest);
+// FileUtils.copy(src, dest);
});
}
@@ -134,7 +135,8 @@ class ValueTypeGenTemplateTest {
val dest = new File(destinationRoot, FileUtils.realtiveFileName(sourceRoot, src));
if(!dest.exists()) {
FileUtils.makeDir(dest.getParentFile());
- FileUtils.copy(src, dest);
+ FileUtils.copyWithCrlf(src, dest);
+// FileUtils.copy(src, dest);
}
});
}
[causeway] 07/08: CAUSEWAY-2485 : updates to templates for value type demo gen
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 7de0468e9ec8ac45a023df9ba9f0388fe889bedf
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu May 18 12:51:34 2023 +0100
CAUSEWAY-2485 : updates to templates for value type demo gen
---
.../demoshowcases/value/ValueShowCase.java | 288 +++++++++++++--------
.../demoshowcases/value/ValueTypeGenTemplate.java | 138 ++++++----
.../src/main/resources/$Templates-description.adoc | 4 +-
3 files changed, 271 insertions(+), 159 deletions(-)
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
index dfd9a63d62..a198bfaca6 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
@@ -19,13 +19,11 @@
package org.apache.causeway.tooling.metaprog.demoshowcases.value;
import org.apache.causeway.tooling.metaprog.demoshowcases.value.ValueTypeGenTemplate.Config;
-import org.apache.causeway.tooling.metaprog.demoshowcases.value.ValueTypeGenTemplate.Config.ConfigBuilder;
import org.apache.causeway.tooling.metaprog.demoshowcases.value.ValueTypeGenTemplate.Template;
import org.apache.causeway.tooling.metaprog.demoshowcases.value.ValueTypeGenTemplate.TemplateVariant;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
-import lombok.val;
@RequiredArgsConstructor
public enum ValueShowCase {
@@ -35,307 +33,387 @@ public enum ValueShowCase {
.javaPackage("demoapp.dom.types.causeway.blobs")
.showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Blob")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BlobValueSemantics")
- .description("binary large objects")
+ .descriptionIfNoPreamble("binary large objects")
.causewaySpecific(true)
- .excludeJdoJpa(true)
- .templateVariant(TemplateVariant.LOB)),
+ .templates(Template.NO_ORM_SET)
+ .templateVariant(TemplateVariant.LOB)
+ ),
CLOB(Config.builder()
.showcaseName("CausewayClob")
.javaPackage("demoapp.dom.types.causeway.clobs")
.showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Clob")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ClobValueSemantics")
- .description("character large objects")
+ .descriptionIfNoPreamble("character large objects")
.causewaySpecific(true)
- .excludeJdoJpa(true)
- .templateVariant(TemplateVariant.LOB)),
+ .templates(Template.NO_ORM_SET)
+ .templateVariant(TemplateVariant.LOB)
+ ),
LOCALRESOURCEPATH(Config.builder()
.showcaseName("CausewayLocalResourcePath")
.javaPackage("demoapp.dom.types.causeway.localresourcepaths")
.showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.LocalResourcePath")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.LocalResourcePathValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble(
+ "The framework has built-in support for representing servlets and other resources that exist alongside the Apache Causeway runtime, using the `LocalResourcePath` data type.\n" +
+ "When an action returns an instance of this type, then this is rendered as a redirect request to the browser to that resource.\n" +
+ "In this way you could for example return a link to a PDF or image (to be rendered by the web browser itself), or provide access to dynamic content by redirecting to a servlet.\n")
+ .causewaySpecific(true)
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
PASSWORD(Config.builder()
.showcaseName("CausewayPassword")
.javaPackage("demoapp.dom.types.causeway.passwords")
.showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Password")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.PasswordValueSemantics")
- .description("strings that are automatically masked as passwords")
+ .descriptionIfNoPreamble("strings that are automatically masked as passwords")
.causewaySpecific(true)
- .excludeJaxb(true)
- .templateVariant(TemplateVariant.DEFAULT)),
- TREENODE(Config.builder()
- .showcaseName("CausewayTreeNode")
- .javaPackage("demoapp.dom.types.causeway.treenode")
- .showcaseValueFullyQualifiedType("org.apache.causeway.applib.graph.tree.TreeNode")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.TreeNodeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .templates(Template.NO_VIEWMODEL_SET)
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
+// TREENODE(Config.builder()
+// .showcaseName("CausewayTreeNode")
+// .javaPackage("demoapp.dom.types.causeway.treenode")
+// .showcaseValueFullyQualifiedType("org.apache.causeway.applib.graph.tree.TreeNode")
+// .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.TreeNodeValueSemantics")
+// .descriptionIfNoPreamble("hierarchical tree nodes")
+// .causewaySpecific(true)
+// .templates(Template.REGULAR_SET_NO_SAMPLES)
+// .templateVariant(TemplateVariant.DEFAULT)),
CALENDAREVENT(Config.builder()
.showcaseName("CausewayCalendarEvent")
.javaPackage("demoapp.dom.types.causewayext.cal")
.showcaseValueFullyQualifiedType("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEvent")
.showcaseValueSemantics("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEventSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble(
+ "The framework has built-in support for modelling events on a calendar, using the `CalendarEvent` data type.\n" +
+ "This is a editable composite type which is rendered as a HTML card.\n" +
+ "It also integrates with the link:https://causeway.apache.org/vw/2.0.0-RC1/fullcalendar/about.html[FullCalendar] module; entities that implement the `CalendarEventable` interface (having a property of type `CalendarEvent`) will be rendered on a calendar.\n")
+ .causewaySpecific(true)
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVAAWTBUFFEREDIMAGE(Config.builder()
.showcaseName("BufferedImage")
.javaPackage("demoapp.dom.types.javaawt.images")
.showcaseValueFullyQualifiedType("java.awt.image.BufferedImage")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BufferedImageValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .frameworkSupportForJpa(true)
+ .frameworkSupportForJdo(true)
+ .frameworkSupportForJaxb(true)
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVAMATHBIGDECIMAL(Config.builder()
.showcaseName("BigDecimal")
.javaPackage("demoapp.dom.types.javamath.bigdecimals")
.showcaseValueFullyQualifiedType("java.math.BigDecimal")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BigDecimalValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVAMATHBIGINTEGER(Config.builder()
.showcaseName("BigInteger")
.javaPackage("demoapp.dom.types.javamath.bigintegers")
.showcaseValueFullyQualifiedType("java.math.BigInteger")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BigIntegerValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVANETURL(Config.builder()
.showcaseName("URLs")
.javaPackage("demoapp.dom.types.javanet.urls")
.showcaseValueFullyQualifiedType("java.net.URL")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.URLValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVASQLDATE(Config.builder()
.showcaseName("JavaSqlDate")
.javaPackage("demoapp.dom.types.javasql.javasqldate")
.showcaseValueFullyQualifiedType("java.sql.Date")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaSqlDateValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.sql.Date`.\n")
+ .caveat("Rather than use this data type, consider using a more modern class such as `java.time.LocalDate`, `java.time.LocalDateTime` or `java.time.OffsetDateTime`")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVASQLTIMESTAMP(Config.builder()
.showcaseName("JavaSqlTimestamp")
.javaPackage("demoapp.dom.types.javasql.javasqltimestamp")
.showcaseValueFullyQualifiedType("java.sql.Timestamp")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaSqlTimeStampValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.sql.Timestamp`.")
+ .caveat("Rather than use this data type, consider using a more modern class such as `java.time.OffsetDateTime`")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVATIMELOCALDATE(Config.builder()
.showcaseName("LocalDate")
.javaPackage("demoapp.dom.types.javatime.javatimelocaldate")
.showcaseValueFullyQualifiedType("java.time.LocalDate")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalDateValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.time.LocalDate`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVATIMELOCALDATETIME(Config.builder()
.showcaseName("LocalDateTime")
.javaPackage("demoapp.dom.types.javatime.javatimelocaldatetime")
.showcaseValueFullyQualifiedType("java.time.LocalDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalDateTimeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.time.LocalDateTime`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVATIMELOCALTIME(Config.builder()
.showcaseName("LocalTime")
.javaPackage("demoapp.dom.types.javatime.javatimelocaltime")
.showcaseValueFullyQualifiedType("java.time.LocalTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalTimeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.time.LocalTime`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVATIMEOFFSETDATETIME(Config.builder()
.showcaseName("OffsetDateTime")
.javaPackage("demoapp.dom.types.javatime.javatimeoffsetdatetime")
.showcaseValueFullyQualifiedType("java.time.OffsetDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.OffsetDateTimeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.time.OffsetDateTime`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVATIMEOFFSETTIME(Config.builder()
.showcaseName("OffsetTime")
.javaPackage("demoapp.dom.types.javatime.javatimeoffsetTime")
.showcaseValueFullyQualifiedType("java.time.OffsetTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.OffsetTimeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.time.OffsetTime`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVATIMEZONEDDATETIME(Config.builder()
.showcaseName("ZonedDateTime")
.javaPackage("demoapp.dom.types.javatime.javatimezoneddatetime")
.showcaseValueFullyQualifiedType("java.time.ZonedDateTime")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.ZonedDateTimeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.time.ZonedDateTime`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JAVAUTILDATE(Config.builder()
.showcaseName("JavaUtilDate")
.javaPackage("demoapp.dom.types.javautil.javautildate")
.showcaseValueFullyQualifiedType("java.util.Date")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaUtilDateValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `java.util.Date`.")
+ .caveat("Rather than use this data type, consider using a more modern class such as `java.time.LocalDate`, `java.time.LocalDateTime` or `java.time.OffsetDateTime`.")
+ .frameworkSupportForJaxb(true)
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JODADATETIME(Config.builder()
.showcaseName("JodaDateTime")
.javaPackage("demoapp.dom.types.javatime.jodadatetime")
.showcaseValueFullyQualifiedType("org.joda.time.DateTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaDateTimeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `org.joda.time.DateTime`.")
+ .caveat("Rather than use this data type, consider using a more modern class such as `java.time.OffsetDateTime`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JODALOCALDATE(Config.builder()
.showcaseName("JodaLocalDate")
.javaPackage("demoapp.dom.types.javatime.jodalocaldate")
.showcaseValueFullyQualifiedType("org.joda.time.LocalDate")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalDateValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `org.joda.time.LocalDate`")
+ .caveat("Rather than use this data type, consider using a more modern class such as `java.time.LocalDate`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JODALOCALDATETIME(Config.builder()
.showcaseName("JodaLocalDateTime")
.javaPackage("demoapp.dom.types.javatime.jodalocaldatetime")
.showcaseValueFullyQualifiedType("org.joda.time.LocalDateTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalDateTimeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
+ .preamble("The framework has built-in support for a number of temporal types, including `org.joda.time.LocalDateTime`.")
+ .caveat("Rather than use this data type, consider using a more modern class such as `java.time.LocalDateTime`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
JODALOCALTIME(Config.builder()
.showcaseName("JodaLocalTime")
.javaPackage("demoapp.dom.types.javatime.jodalocaltime")
.showcaseValueFullyQualifiedType("org.joda.time.LocalTime")
.showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalTimeValueSemantics")
- .templateVariant(TemplateVariant.DEFAULT)),
-
+ .preamble("The framework has built-in support for a number of temporal types, including `org.joda.time.LocalTime`.")
+ .caveat("Rather than use this data type, consider using a more modern class such as `java.time.LocalTime`.")
+ .templateVariant(TemplateVariant.DEFAULT)
+ ),
MARKUP(Config.builder()
.showcaseName("CausewayMarkup")
.javaPackage("demoapp.dom.types.causeway.markups")
.showcaseValueFullyQualifiedType("org.apache.causeway.applib.value.Markup")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.MarkupValueSemantics")
- .templateVariant(TemplateVariant.LOB)),
+ .descriptionIfNoPreamble("arbitrary HTML markup")
+ .causewaySpecific(true)
+ .templateVariant(TemplateVariant.LOB)
+ ),
MARKDOWN(Config.builder()
.showcaseName("CausewayMarkdown")
.javaPackage("demoapp.dom.types.causewayval.markdowns")
.showcaseValueFullyQualifiedType("org.apache.causeway.valuetypes.markdown.applib.value.Markdown")
.showcaseValueSemantics("org.apache.causeway.valuetypes.markdown.metamodel.semantics.MarkdownValueSemantics")
.templates(Template.REGULAR_SET_NO_SAMPLES) // demo provides its own MarkdownSamples
- .templateVariant(TemplateVariant.LOB)),
+ .descriptionIfNoPreamble("HTML markup, written in Markdown")
+ .causewaySpecific(true)
+ .templateVariant(TemplateVariant.LOB)
+ ),
ASCIIDOC(Config.builder()
.showcaseName("CausewayAsciiDoc")
.javaPackage("demoapp.dom.types.causewayval.asciidocs")
.showcaseValueFullyQualifiedType("org.apache.causeway.valuetypes.asciidoc.applib.value.AsciiDoc")
.showcaseValueSemantics("org.apache.causeway.valuetypes.asciidoc.metamodel.semantics.AsciiDocValueSemantics")
.templates(Template.REGULAR_SET_NO_SAMPLES) // demo provides its own AsciiDocSamples
- .templateVariant(TemplateVariant.LOB)),
+ .descriptionIfNoPreamble("HTML markup, written in Asciidoc")
+ .causewaySpecific(true)
+ .templateVariant(TemplateVariant.LOB)
+ ),
VEGA(Config.builder()
.showcaseName("CausewayVega")
.javaPackage("demoapp.dom.types.causewayval.vegas")
.showcaseValueFullyQualifiedType("org.apache.causeway.valuetypes.vega.applib.value.Vega")
.showcaseValueSemantics("org.apache.causeway.valuetypes.vega.metamodel.semantics.VegaValueSemantics")
- .templateVariant(TemplateVariant.LOB)),
+ .descriptionIfNoPreamble("a visualization grammar (to render interactive graphs, maps and other designs)")
+ .causewaySpecific(true)
+ .templateVariant(TemplateVariant.LOB)
+ ),
UUID(Config.builder()
.showcaseName("JavaUtilUuid")
.javaPackage("demoapp.dom.types.javautil.uuids")
.showcaseValueFullyQualifiedType("java.util.UUID")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.UUIDValueSemantics")),
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.UUIDValueSemantics")
+ .frameworkSupportForJpa(true)
+ .frameworkSupportForJdo(false) // JDO supports out of the box
+ ),
ENUM(Config.builder()
.showcaseName("JavaLangEnum")
.javaPackage("demoapp.dom.types.javalang.enums")
.showcaseValueFullyQualifiedType("demoapp.dom._infra.samples.DemoEnum")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.EnumValueSemantics")
- .templates(Template.REGULAR_SET_NO_SAMPLES)), // demo provides its own EnumSamples
+ .templates(Template.REGULAR_SET_NO_SAMPLES) // demo provides its own EnumSamples
+ ),
STRING(Config.builder()
.showcaseName("JavaLangString")
.javaPackage("demoapp.dom.types.javalang.strings")
.showcaseValueFullyQualifiedType("java.lang.String")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.StringValueSemantics")
- .templates(Template.REGULAR_SET_NO_SAMPLES)), // demo provides its own NameSamples
+ .templates(Template.REGULAR_SET_NO_SAMPLES) // demo provides its own NameSamples
+ ),
// VOID(Config.builder()
// .showcaseName("JavaLangVoid")
// .javaPackage("demoapp.dom.types.javalang.voids")
// .showcaseValueType("java.lang.Void")
// .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.VoidValueSemantics")),
- PBOOL(fundamentalTypeSupportNotice()
+ PBOOL(Config.builder()
.showcaseName("PrimitiveBoolean")
.javaPackage("demoapp.dom.types.primitive.booleans")
.showcaseValueFullyQualifiedType("boolean")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BooleanValueSemantics")
.templates(Template.PRIMITIVE_SET)
- .templateVariant(TemplateVariant.PRIMITIVE)),
- PCHAR(fundamentalTypeSupportNotice()
+ .templateVariant(TemplateVariant.PRIMITIVE)
+ ),
+ PCHAR(Config.builder()
.showcaseName("PrimitiveChar")
.javaPackage("demoapp.dom.types.primitive.chars")
.showcaseValueFullyQualifiedType("char")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.CharacterValueSemantics")
.templates(Template.PRIMITIVE_SET)
- .templateVariant(TemplateVariant.PRIMITIVE)),
- PLONG(fundamentalTypeSupportNotice()
+ .templateVariant(TemplateVariant.PRIMITIVE)
+ ),
+ PLONG(Config.builder()
.showcaseName("PrimitiveLong")
.javaPackage("demoapp.dom.types.primitive.longs")
.showcaseValueFullyQualifiedType("long")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.LongValueSemantics")
.templates(Template.PRIMITIVE_SET)
- .templateVariant(TemplateVariant.PRIMITIVE)),
- PINT(fundamentalTypeSupportNotice()
+ .templateVariant(TemplateVariant.PRIMITIVE)
+ ),
+ PINT(Config.builder()
.showcaseName("PrimitiveInt")
.javaPackage("demoapp.dom.types.primitive.ints")
.showcaseValueFullyQualifiedType("int")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.IntValueSemantics")
.templates(Template.PRIMITIVE_SET)
- .templateVariant(TemplateVariant.PRIMITIVE)),
- PSHORT(fundamentalTypeSupportNotice()
+ .templateVariant(TemplateVariant.PRIMITIVE)
+ ),
+ PSHORT(Config.builder()
.showcaseName("PrimitiveShort")
.javaPackage("demoapp.dom.types.primitive.shorts")
.showcaseValueFullyQualifiedType("short")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ShortValueSemantics")
.templates(Template.PRIMITIVE_SET)
- .templateVariant(TemplateVariant.PRIMITIVE)),
- PBYTE(fundamentalTypeSupportNotice()
+ .templateVariant(TemplateVariant.PRIMITIVE)
+ ),
+ PBYTE(Config.builder()
.showcaseName("PrimitiveByte")
.javaPackage("demoapp.dom.types.primitive.bytes")
.showcaseValueFullyQualifiedType("byte")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ByteValueSemantics")
.templates(Template.PRIMITIVE_SET)
- .templateVariant(TemplateVariant.PRIMITIVE)),
- PDOUBLE(fundamentalTypeSupportNotice()
+ .templateVariant(TemplateVariant.PRIMITIVE)
+ ),
+ PDOUBLE(Config.builder()
.showcaseName("PrimitiveDouble")
.javaPackage("demoapp.dom.types.primitive.doubles")
.showcaseValueFullyQualifiedType("double")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.DoubleValueSemantics")
.templates(Template.PRIMITIVE_SET)
- .templateVariant(TemplateVariant.PRIMITIVE)),
- PFLOAT(fundamentalTypeSupportNotice()
+ .templateVariant(TemplateVariant.PRIMITIVE)
+ ),
+ PFLOAT(Config.builder()
.showcaseName("PrimitiveFloat")
.javaPackage("demoapp.dom.types.primitive.floats")
.showcaseValueFullyQualifiedType("float")
.showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.FloatValueSemantics")
.templates(Template.PRIMITIVE_SET)
- .templateVariant(TemplateVariant.PRIMITIVE)),
- WBOOL(fundamentalTypeSupportNotice()
+ .templateVariant(TemplateVariant.PRIMITIVE)
+ ),
+ WBOOL(Config.builder()
.showcaseName("WrapperBoolean")
.javaPackage("demoapp.dom.types.javalang.booleans")
.showcaseValueFullyQualifiedType("java.lang.Boolean")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BooleanValueSemantics")),
- WCHAR(fundamentalTypeSupportNotice()
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BooleanValueSemantics")
+ ),
+ WCHAR(Config.builder()
.showcaseName("WrapperCharacter")
.javaPackage("demoapp.dom.types.javalang.characters")
.showcaseValueFullyQualifiedType("java.lang.Character")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.CharacterValueSemantics")),
- WLONG(fundamentalTypeSupportNotice()
- .showcaseName("WrapperLong")
- .javaPackage("demoapp.dom.types.javalang.longs")
- .showcaseValueFullyQualifiedType("java.lang.Long")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.LongValueSemantics")),
- WINT(fundamentalTypeSupportNotice()
- .showcaseName("WrapperInteger")
- .javaPackage("demoapp.dom.types.javalang.integers")
- .showcaseValueFullyQualifiedType("java.lang.Integer")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.IntValueSemantics")),
- WSHORT(fundamentalTypeSupportNotice()
- .showcaseName("WrapperShort")
- .javaPackage("demoapp.dom.types.javalang.shorts")
- .showcaseValueFullyQualifiedType("java.lang.Short")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ShortValueSemantics")),
- WBYTE(fundamentalTypeSupportNotice()
- .showcaseName("WrapperByte")
- .javaPackage("demoapp.dom.types.javalang.bytes")
- .showcaseValueFullyQualifiedType("java.lang.Byte")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ByteValueSemantics")),
- WDOUBLE(fundamentalTypeSupportNotice()
- .showcaseName("WrapperDouble")
- .javaPackage("demoapp.dom.types.javalang.doubles")
- .showcaseValueFullyQualifiedType("java.lang.Double")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.DoubleValueSemantics")),
- WFLOAT(fundamentalTypeSupportNotice()
- .showcaseName("WrapperFloat")
- .javaPackage("demoapp.dom.types.javalang.floats")
- .showcaseValueFullyQualifiedType("java.lang.Float")
- .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.FloatValueSemantics")),
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.CharacterValueSemantics")
+ ),
+ WLONG(Config.builder()
+ .showcaseName("WrapperLong")
+ .javaPackage("demoapp.dom.types.javalang.longs")
+ .showcaseValueFullyQualifiedType("java.lang.Long")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.LongValueSemantics")
+ ),
+ WINT(Config.builder()
+ .showcaseName("WrapperInteger")
+ .javaPackage("demoapp.dom.types.javalang.integers")
+ .showcaseValueFullyQualifiedType("java.lang.Integer")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.IntValueSemantics")
+ ),
+ WSHORT(Config.builder()
+ .showcaseName("WrapperShort")
+ .javaPackage("demoapp.dom.types.javalang.shorts")
+ .showcaseValueFullyQualifiedType("java.lang.Short")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ShortValueSemantics")
+ ),
+ WBYTE(Config.builder()
+ .showcaseName("WrapperByte")
+ .javaPackage("demoapp.dom.types.javalang.bytes")
+ .showcaseValueFullyQualifiedType("java.lang.Byte")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ByteValueSemantics")
+ ),
+ WDOUBLE(Config.builder()
+ .showcaseName("WrapperDouble")
+ .javaPackage("demoapp.dom.types.javalang.doubles")
+ .showcaseValueFullyQualifiedType("java.lang.Double")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.DoubleValueSemantics")
+ ),
+ WFLOAT(Config.builder()
+ .showcaseName("WrapperFloat")
+ .javaPackage("demoapp.dom.types.javalang.floats")
+ .showcaseValueFullyQualifiedType("java.lang.Float")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.FloatValueSemantics")
+ ),
;
@Getter final ValueTypeGenTemplate.Config.ConfigBuilder configBuilder;
- private static ConfigBuilder fundamentalTypeSupportNotice() {
- val defaults = Config.builder().build();
- return Config.builder()
- .jdoTypeSupportNotice(defaults.getJdoTypeSupportNotice()
- + " see link:https://www.datanucleus.org/products/accessplatform_6_0/jdo/mapping.html#_primitive_and_java_lang_types[DataNucleus]")
- .jpaTypeSupportNotice(defaults.getJpaTypeSupportNotice()
- + " see link:https://www.objectdb.com/java/jpa/entity/types#simple_java_data_types[ObjectDB]")
- .jaxbTypeSupportNotice(defaults.getJaxbTypeSupportNotice()
- + " see link:https://docs.oracle.com/cd/E12840_01/wls/docs103/webserv/data_types.html#wp223908[Oracle]");
- }
-
}
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
index 035add04f2..e2ad87d441 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueTypeGenTemplate.java
@@ -50,56 +50,87 @@ public class ValueTypeGenTemplate {
public static class Config {
final File outputRootDir;
final String showcaseName;
+
+ final String showcaseValueFullyQualifiedType;
+ final String showcaseValueSemantics;
+
+ public String getShowcaseValueSimpleType() {
+ String fqt = getShowcaseValueFullyQualifiedType();
+ int i = fqt.lastIndexOf(".");
+ String simpleType = fqt.substring(i + 1);
+ return simpleType;
+ }
+
/**
- * If set, then the template files in the `jdo` and `jpa` packages are NOT generated.
- * This is to accommodate data types such as Blob and Clob that need custom treatment.
+ * If present, is used instead the first sentence.
*/
- final boolean excludeJdoJpa;
+ final String preamble;
+
/**
- * If set, then the template files in the `jaxb` package is NOT generated.
- * This is to accommodate data types such as Password that need custom treatment.
+ * If present, is used after the first sentence.
*/
- final boolean excludeJaxb;
+ final String caveat;
+
+ public String getPreamble() {
+ return preamble != null
+ ? preamble
+ : "The framework has built-in support for " +
+ (getDescriptionIfNoPreamble() != null
+ ? getDescriptionIfNoPreamble() + ", using"
+ : "") +
+ " the `" + getShowcaseValueSimpleType() + "` data type.";
+ }
+
+
/**
- * If present, is used within the first sentence.
+ * If present, is used within the first sentence (unless preamble specified, in which case that overrides
*/
- final String description;
+ final String descriptionIfNoPreamble;
/**
* If present, adds a NOTE: ... and also changes what {@link #getJdoTypeSupportNotice()}, {@link #getJpaTypeSupportNotice()} and {@link #getJaxbTypeSupportNotice()} returns.
*/
final boolean causewaySpecific;
- final String showcaseValueFullyQualifiedType;
- final String showcaseValueSemantics;
- @Builder.Default
- final String jdoTypeSupportNotice =
- "JDO supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
- public String getJdoTypeSupportNotice() {
- return causewaySpecific
- ? "Apache Causeway provides its own implementation of the relevant JDO extension points for the `" + getShowcaseValueSimpleType() + "` value type, meaning that JDO can persist properties of this value type without further configuration."
- : jdoTypeSupportNotice;
+ final boolean frameworkSupportForJpa;
+ /**
+ * Implied by {@link #isCausewaySpecific()}, if present then indicates that the framework has added support for JPA persistence for certain data types.
+ */
+ private boolean isFrameworkSupportForJpa() {
+ return causewaySpecific || frameworkSupportForJpa;
}
-
- @Builder.Default
- final String jpaTypeSupportNotice =
- "JPA supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
-
public String getJpaTypeSupportNotice() {
- return causewaySpecific
+ return isFrameworkSupportForJpa()
? "Apache Causeway provides its own implementation of the relevant JPA extension points for the `" + getShowcaseValueSimpleType() + "` value type, meaning that JPA can persist properties of this value type without further configuration."
- : jpaTypeSupportNotice;
+ : "JPA supports `" + getShowcaseValueSimpleType() + "` out-of-the-box, so no special annotations are required.\nSee link:https://www.objectdb.com/java/jpa/entity/types#simple_java_data_types[ObjectDB]";
}
- @Builder.Default
- final String jaxbTypeSupportNotice =
- "JAXB supports `#{showcase-simple-type}` out-of-the-box, so no special annotations are required.";
+ final boolean frameworkSupportForJdo;
+ /**
+ * Implied by {@link #isCausewaySpecific()}, if present then indicates that the framework has added support for JDO persistence for certain data types.
+ */
+ private boolean isFrameworkSupportForJdo() {
+ return causewaySpecific || frameworkSupportForJdo;
+ }
+ public String getJdoTypeSupportNotice() {
+ return isFrameworkSupportForJdo()
+ ? "Apache Causeway provides its own implementation of the relevant JDO extension points for the `" + getShowcaseValueSimpleType() + "` value type, meaning that JDO can persist properties of this value type without further configuration."
+ : "JDO supports `" + getShowcaseValueSimpleType() + "` out-of-the-box, so no special annotations are required.\nSee link:https://www.datanucleus.org/products/accessplatform_6_0/jdo/mapping.html#_primitive_and_java_lang_types[DataNucleus]";
+ }
+ final boolean frameworkSupportForJaxb;
+ /**
+ * Implied by {@link #isCausewaySpecific()}, if present then indicates that the framework has added support for JAXB serialization for certain data types.
+ */
+ private boolean isFrameworkSupportForJaxb() {
+ return causewaySpecific || frameworkSupportForJaxb;
+ }
public String getJaxbTypeSupportNotice() {
- return causewaySpecific
+ return isFrameworkSupportForJaxb()
? "Apache Causeway provides its own implementation of `@XmlJavaTypeAdapter` for the `" + getShowcaseValueSimpleType() + "` value type, meaning that JAXB can serialize properties of this value type without further configuration."
- : jaxbTypeSupportNotice;
+ : "JAXB supports `" + getShowcaseValueSimpleType() + "` out-of-the-box, so no special annotations are required.\nSee link:https://docs.oracle.com/cd/E12840_01/wls/docs103/webserv/data_types.html#wp223908[Oracle]";
}
+
final String javaPackage;
@Builder.Default
final String fileNamePlaceholderForShowcaseName = "$Template";
@@ -112,12 +143,6 @@ public class ValueTypeGenTemplate {
@Builder.Default
final TemplateVariant templateVariant = TemplateVariant.DEFAULT;
- public String getShowcaseValueSimpleType() {
- String fqt = getShowcaseValueFullyQualifiedType();
- int i = fqt.lastIndexOf(".");
- String simpleType = fqt.substring(i + 1);
- return simpleType;
- }
}
@RequiredArgsConstructor
@@ -169,30 +194,47 @@ public class ValueTypeGenTemplate {
HOLDER_UPDATE_ROO_PROPERTY("holder/%sHolder_updateReadOnlyOptionalProperty", Generator.JAVA),
HOLDER_UPDATE_RO_PROPERTY_WITH_CHOICES("holder/%sHolder_updateReadOnlyPropertyWithChoices", Generator.JAVA),
HOLDER_UPDATE_ROO_PROPERTY_WITH_CHOICES("holder/%sHolder_updateReadOnlyOptionalPropertyWithChoices", Generator.JAVA),
- COLLECTION("%ss", Generator.JAVA),
+
JDO("jdo/%sJdo", Generator.JAVA),
JDO_ENTITIES("jdo/%sJdoEntities", Generator.JAVA),
+ JDO_DESCRIPTION("jdo/%sJdo-description", Generator.DOC),
+
JPA("jpa/%sJpa", Generator.JAVA),
JPA_ENTITIES("jpa/%sJpaEntities", Generator.JAVA),
+ JPA_DESCRIPTION("jpa/%sJpa-description", Generator.DOC),
+
ENTITY("persistence/%sEntity", Generator.JAVA),
+ ENTITY_LAYOUT("persistence/%sEntity", Generator.LAYOUT),
SEEDING("persistence/%sSeeding", Generator.JAVA),
+
SAMPLES("samples/%sSamples", Generator.JAVA),
+
VIEWMODEL("vm/%sVm", Generator.JAVA),
+ VIEWMODEL_DESCRIPTION("vm/%sVm-description", Generator.DOC),
+ VIEWMODEL_LAYOUT("vm/%sVm", Generator.LAYOUT),
+ COLLECTION("%ss", Generator.JAVA),
COMMON_DOC("%ss-common", Generator.DOC),
DESCRIPTION("%ss-description", Generator.DOC),
- JDO_DESCRIPTION("jdo/%sJdo-description", Generator.DOC),
- JPA_DESCRIPTION("jpa/%sJpa-description", Generator.DOC),
- VIEWMODEL_DESCRIPTION("vm/%sVm-description", Generator.DOC),
-
COLLECTION_LAYOUT("%ss", Generator.LAYOUT),
- ENTITY_LAYOUT("persistence/%sEntity", Generator.LAYOUT),
- VIEWMODEL_LAYOUT("vm/%sVm", Generator.LAYOUT)
;
public static Can<Template> REGULAR_SET = Can.ofArray(Template.values())
.remove(HOLDER_ACTION_RETURNING_ARRAY);
+ public static Can<Template> NO_ORM_SET = REGULAR_SET
+ .remove(JPA)
+ .remove(JPA_DESCRIPTION)
+ .remove(JPA_ENTITIES)
+ .remove(JDO)
+ .remove(JDO_DESCRIPTION)
+ .remove(JDO_ENTITIES);
+
+ public static Can<Template> NO_VIEWMODEL_SET = REGULAR_SET
+ .remove(VIEWMODEL)
+ .remove(VIEWMODEL_DESCRIPTION)
+ .remove(VIEWMODEL_LAYOUT);
+
public static Can<Template> REGULAR_SET_NO_SAMPLES = Can.ofArray(Template.values())
.remove(HOLDER_ACTION_RETURNING_ARRAY)
.remove(SAMPLES);
@@ -261,15 +303,6 @@ public class ValueTypeGenTemplate {
for(var template: config.getTemplates()) {
val templateFile = template.templateFile(config);
- String templateFilePath = templateFile.getCanonicalPath();
- if (config.isExcludeJdoJpa() &&
- (templateFilePath.contains("jdo") || templateFilePath.contains("jpa"))) {
- continue;
- }
- if (config.isExcludeJaxb() &&
- templateFilePath.contains("jaxb")) {
- continue;
- }
val genTarget = template.outputFile(config);
@@ -277,7 +310,8 @@ public class ValueTypeGenTemplate {
templateVars.putAll(config.templateVariables);
templateVars.put("java-package", template.javaPackage(config));
templateVars.put("showcase-name", config.showcaseName);
- templateVars.put("showcase-description", (config.getDescription() != null ? config.getDescription() + ", using" : ""));
+ templateVars.put("showcase-preamble", config.getPreamble());
+ templateVars.put("showcase-caveat", (config.getCaveat() != null ? config.getCaveat() + "\n\n" : ""));
templateVars.put("showcase-note-if-causeway-specific", (config.isCausewaySpecific() ? "NOTE: This is an Apache Causeway specific data type.\n\n": ""));
templateVars.put("showcase-simple-type", config.getShowcaseValueSimpleType());
templateVars.put("showcase-fully-qualified-type", config.showcaseValueFullyQualifiedType);
diff --git a/tooling/metaprog/src/main/resources/$Templates-description.adoc b/tooling/metaprog/src/main/resources/$Templates-description.adoc
index 756564d374..d252bb7eda 100644
--- a/tooling/metaprog/src/main/resources/$Templates-description.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-description.adoc
@@ -1,9 +1,9 @@
:Notice: 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 ag [...]
-The framework has built-in support for #{showcase-description} the `#{showcase-simple-type}` data type.
+#{showcase-preamble}
These can be used either in entities or view models.
-#{showcase-note-if-causeway-specific}== How this demo works
+#{showcase-caveat}#{showcase-note-if-causeway-specific}== How this demo works
On the left hand side is a collection of entities that uses the `#{showcase-simple-type}` datatype.
There is also an action that opens a view model; this view model also uses the `#{showcase-simple-type}` datatype.
[causeway] 01/08: CAUSEWAY-2485: updates descriptions of primitive and wrapper types
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 29c38b063ea6c17516c78e45f15f6b7716e11855
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed May 17 19:56:32 2023 +0100
CAUSEWAY-2485: updates descriptions of primitive and wrapper types
---
.../causeway/blobs/CausewayBlobs-description.adoc | 22 +++++++++-------------
.../markups/CausewayMarkups-description.adoc | 2 +-
.../asciidocs/CausewayAsciiDocs-description.adoc | 2 +-
.../markdowns/CausewayMarkdowns-description.adoc | 2 +-
.../vegas/CausewayVegas-description.adoc | 2 +-
.../booleans/WrapperBooleans-description.adoc | 2 +-
.../javalang/bytes/WrapperBytes-description.adoc | 2 +-
.../characters/WrapperCharacters-description.adoc | 2 +-
.../doubles/WrapperDoubles-description.adoc | 2 +-
.../javalang/enums/JavaLangEnums-description.adoc | 2 +-
.../javalang/floats/WrapperFloats-description.adoc | 2 +-
.../integers/WrapperIntegers-description.adoc | 2 +-
.../javalang/longs/WrapperLongs-description.adoc | 2 +-
.../javalang/shorts/WrapperShorts-description.adoc | 2 +-
.../strings/JavaLangStrings-description.adoc | 2 +-
.../javautil/uuids/JavaUtilUuids-description.adoc | 2 +-
.../booleans/PrimitiveBooleans-description.adoc | 2 +-
.../bytes/PrimitiveBytes-description.adoc | 2 +-
.../chars/PrimitiveChars-description.adoc | 2 +-
.../doubles/PrimitiveDoubles-description.adoc | 2 +-
.../floats/PrimitiveFloats-description.adoc | 2 +-
.../primitive/ints/PrimitiveInts-description.adoc | 2 +-
.../longs/PrimitiveLongs-description.adoc | 2 +-
.../shorts/PrimitiveShorts-description.adoc | 2 +-
24 files changed, 32 insertions(+), 36 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/causeway/blobs/CausewayBlobs-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/causeway/blobs/CausewayBlobs-description.adoc
index d35bafbbc9..15d03cfb70 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/causeway/blobs/CausewayBlobs-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/causeway/blobs/CausewayBlobs-description.adoc
@@ -4,28 +4,24 @@ The framework has built-in support for binary large objects, using the `Blob` da
NOTE: This is an Apache Causeway specific data type.
-From here you can:
+== How this demo works
-* navigate to an entity that uses the `Blob` datatype
-* open a view model that uses the `Blob` datatype
+On the left hand side is a collection of entities that uses the `Blob` datatype.
+There is also an action that opens a view model; this view model also uses the `Blob` datatype.
-Some properties on these domain objects are mandatory, some optional.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
-== Common interfaces
+=== Implementation Notes
-The entity and view model types both implement some common interfaces.
-
-=== CausewayBlobHolder
-
-The `CausewayBlobHolder` interface is used to contribute a number of mixins to both types:
+The entity and view model types both implement some common interfaces:
+* The `CausewayBlobHolder` interface is used to contribute a number of mixins to both types:
++
[source,java]
----
include::holder/CausewayBlobHolder.java[tags=class]
----
-=== CausewayBlobHolder2
-
-The `CausewayBlobHolder2` interface is used to demonstrate support for label positions using `@PropertyLayout(labelPosition=...)`.
+* The `CausewayBlobHolder2` interface is used to demonstrate support for label positions using `@PropertyLayout(labelPosition=...)`.
Further details, along with the effect of this annotation, can be seen on the entity and view model object pages.
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/causeway/markups/CausewayMarkups-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/causeway/markups/CausewayMarkups-description.adoc
index 34fd6fd89c..d6c59c4096 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/causeway/markups/CausewayMarkups-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/causeway/markups/CausewayMarkups-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `org.apache.causeway.applib.value.Markup` datatype.
There is also an action that opens a view model; this view model also uses the `org.apache.causeway.applib.value.Markup` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/asciidocs/CausewayAsciiDocs-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/asciidocs/CausewayAsciiDocs-description.adoc
index 1b0bbe9016..50c6b08ee7 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/asciidocs/CausewayAsciiDocs-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/asciidocs/CausewayAsciiDocs-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `org.apache.causeway.valuetypes.asciidoc.applib.value.AsciiDoc` datatype.
There is also an action that opens a view model; this view model also uses the `org.apache.causeway.valuetypes.asciidoc.applib.value.AsciiDoc` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/markdowns/CausewayMarkdowns-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/markdowns/CausewayMarkdowns-description.adoc
index f8f01dd9bb..74b8ef0aa9 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/markdowns/CausewayMarkdowns-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/markdowns/CausewayMarkdowns-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `org.apache.causeway.valuetypes.markdown.applib.value.Markdown` datatype.
There is also an action that opens a view model; this view model also uses the `org.apache.causeway.valuetypes.markdown.applib.value.Markdown` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/vegas/CausewayVegas-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/vegas/CausewayVegas-description.adoc
index 8d975e7d73..5701fb1902 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/vegas/CausewayVegas-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/causewayval/vegas/CausewayVegas-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `org.apache.causeway.valuetypes.vega.applib.value.Vega` datatype.
There is also an action that opens a view model; this view model also uses the `org.apache.causeway.valuetypes.vega.applib.value.Vega` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/booleans/WrapperBooleans-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/booleans/WrapperBooleans-description.adoc
index b6a94b0191..a8746dc761 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/booleans/WrapperBooleans-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/booleans/WrapperBooleans-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.Boolean` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.Boolean` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/bytes/WrapperBytes-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/bytes/WrapperBytes-description.adoc
index bf22678c07..65d1f9040d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/bytes/WrapperBytes-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/bytes/WrapperBytes-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.Byte` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.Byte` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/characters/WrapperCharacters-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/characters/WrapperCharacters-description.adoc
index 644e4e60a6..4ec02cfd60 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/characters/WrapperCharacters-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/characters/WrapperCharacters-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.Character` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.Character` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/doubles/WrapperDoubles-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/doubles/WrapperDoubles-description.adoc
index 56a4f2ff83..c1688b41ef 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/doubles/WrapperDoubles-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/doubles/WrapperDoubles-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.Double` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.Double` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-description.adoc
index 567c525aec..8ad668eede 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `demoapp.dom._infra.samples.DemoEnum` datatype.
There is also an action that opens a view model; this view model also uses the `demoapp.dom._infra.samples.DemoEnum` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/floats/WrapperFloats-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/floats/WrapperFloats-description.adoc
index 07c4361ac1..a615576864 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/floats/WrapperFloats-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/floats/WrapperFloats-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.Float` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.Float` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/integers/WrapperIntegers-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/integers/WrapperIntegers-description.adoc
index 5ef4cb1ed4..083562f848 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/integers/WrapperIntegers-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/integers/WrapperIntegers-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.Integer` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.Integer` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/longs/WrapperLongs-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/longs/WrapperLongs-description.adoc
index 7078140374..39e23edd1b 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/longs/WrapperLongs-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/longs/WrapperLongs-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.Long` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.Long` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/shorts/WrapperShorts-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/shorts/WrapperShorts-description.adoc
index 46ddda9e26..2a3b958e80 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/shorts/WrapperShorts-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/shorts/WrapperShorts-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.Short` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.Short` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/strings/JavaLangStrings-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/strings/JavaLangStrings-description.adoc
index 02f5df2a20..adb99c1885 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/strings/JavaLangStrings-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/strings/JavaLangStrings-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.lang.String` datatype.
There is also an action that opens a view model; this view model also uses the `java.lang.String` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javautil/uuids/JavaUtilUuids-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javautil/uuids/JavaUtilUuids-description.adoc
index 94cb2d7ba5..4658af9652 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javautil/uuids/JavaUtilUuids-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javautil/uuids/JavaUtilUuids-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `java.util.UUID` datatype.
There is also an action that opens a view model; this view model also uses the `java.util.UUID` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
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 0e51c48c06..2649124ed0 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
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `boolean` datatype.
There is also an action that opens a view model; this view model also uses the `boolean` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/bytes/PrimitiveBytes-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/bytes/PrimitiveBytes-description.adoc
index 660a388688..c815aaebaf 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/bytes/PrimitiveBytes-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/bytes/PrimitiveBytes-description.adoc
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `byte` datatype.
There is also an action that opens a view model; this view model also uses the `byte` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/PrimitiveChars-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/PrimitiveChars-description.adoc
index 876c89bf00..d990ba4cfb 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/PrimitiveChars-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/PrimitiveChars-description.adoc
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `char` datatype.
There is also an action that opens a view model; this view model also uses the `char` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/doubles/PrimitiveDoubles-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/doubles/PrimitiveDoubles-description.adoc
index aae2f809bb..903c76edd0 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/doubles/PrimitiveDoubles-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/doubles/PrimitiveDoubles-description.adoc
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `double` datatype.
There is also an action that opens a view model; this view model also uses the `double` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/floats/PrimitiveFloats-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/floats/PrimitiveFloats-description.adoc
index 0be2a35598..508c83867c 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/floats/PrimitiveFloats-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/floats/PrimitiveFloats-description.adoc
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `float` datatype.
There is also an action that opens a view model; this view model also uses the `float` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/ints/PrimitiveInts-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/ints/PrimitiveInts-description.adoc
index b0e67b43cb..05fd72a56e 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/ints/PrimitiveInts-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/ints/PrimitiveInts-description.adoc
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `int` datatype.
There is also an action that opens a view model; this view model also uses the `int` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/longs/PrimitiveLongs-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/longs/PrimitiveLongs-description.adoc
index 77731308a5..19bc5d1c3c 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/longs/PrimitiveLongs-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/longs/PrimitiveLongs-description.adoc
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `long` datatype.
There is also an action that opens a view model; this view model also uses the `long` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/shorts/PrimitiveShorts-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/shorts/PrimitiveShorts-description.adoc
index 02e2ce6afd..053d2b1542 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/shorts/PrimitiveShorts-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/shorts/PrimitiveShorts-description.adoc
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `short` datatype.
There is also an action that opens a view model; this view model also uses the `short` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
[causeway] 02/08: CAUSEWAY-2485: wip, adds other data types for code gen to demo
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 95afe5ef6e4c47e92c0e8b44afd41dedf431160f
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed May 17 19:57:32 2023 +0100
CAUSEWAY-2485: wip, adds other data types for code gen to demo
---
.../demoshowcases/value/ValueShowCase.java | 139 +++++++++++++++++++++
.../src/main/resources/$Templates-description.adoc | 2 +-
.../$Templates-description~primitive.adoc | 2 +-
3 files changed, 141 insertions(+), 2 deletions(-)
diff --git a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
index 089d373c8f..74e9a23808 100644
--- a/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
+++ b/tooling/metaprog/src/main/java/org/apache/causeway/tooling/metaprog/demoshowcases/value/ValueShowCase.java
@@ -30,6 +30,145 @@ import lombok.val;
@RequiredArgsConstructor
public enum ValueShowCase {
+ BLOB(Config.builder()
+ .showcaseName("CausewayBlob")
+ .javaPackage("demoapp.dom.types.causeway.blobs")
+ .showcaseValueType("org.apache.causeway.applib.value.Blob")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BlobValueSemantics")
+ .templateVariant(TemplateVariant.LOB)),
+ CLOB(Config.builder()
+ .showcaseName("CausewayClob")
+ .javaPackage("demoapp.dom.types.causeway.clobs")
+ .showcaseValueType("org.apache.causeway.applib.value.Clob")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.ClobValueSemantics")
+ .templateVariant(TemplateVariant.LOB)),
+ LOCALRESOURCEPATH(Config.builder()
+ .showcaseName("CausewayLocalResourcePath")
+ .javaPackage("demoapp.dom.types.causeway.localresourcepaths")
+ .showcaseValueType("org.apache.causeway.applib.value.LocalResourcePath")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.LocalResourcePathValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ PASSWORD(Config.builder()
+ .showcaseName("CausewayPassword")
+ .javaPackage("demoapp.dom.types.causeway.passwords")
+ .showcaseValueType("org.apache.causeway.applib.value.Password")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.PasswordValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ TREENODE(Config.builder()
+ .showcaseName("CausewayTreeNode")
+ .javaPackage("demoapp.dom.types.causeway.treenode")
+ .showcaseValueType("org.apache.causeway.applib.graph.tree.TreeNode")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.TreeNodeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ CALENDAREVENT(Config.builder()
+ .showcaseName("CausewayCalendarEvent")
+ .javaPackage("demoapp.dom.types.causewayext.cal")
+ .showcaseValueType("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEvent")
+ .showcaseValueSemantics("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEventSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVAAWTBUFFEREDIMAGE(Config.builder()
+ .showcaseName("BufferedImage")
+ .javaPackage("demoapp.dom.types.javaawt.images")
+ .showcaseValueType("java.awt.BufferedImage")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BufferedImageValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVAMATHBIGDECIMAL(Config.builder()
+ .showcaseName("BigDecimal")
+ .javaPackage("demoapp.dom.types.javamath.bigdecimals")
+ .showcaseValueType("java.math.BigDecimal")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BigDecimalValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVAMATHBIGINTEGER(Config.builder()
+ .showcaseName("BigInteger")
+ .javaPackage("demoapp.dom.types.javamath.bigintegers")
+ .showcaseValueType("java.math.BigInteger")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.BigIntegerValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVANETURL(Config.builder()
+ .showcaseName("URLs")
+ .javaPackage("demoapp.dom.types.javanet.urls")
+ .showcaseValueType("java.net.URL")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.URLValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVASQLDATE(Config.builder()
+ .showcaseName("JavaSqlDate")
+ .javaPackage("demoapp.dom.types.javasql.javasqldate")
+ .showcaseValueType("java.sql.Date")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaSqlDateValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVASQLTIMESTAMP(Config.builder()
+ .showcaseName("JavaSqlTimestamp")
+ .javaPackage("demoapp.dom.types.javasql.javasqltimestamp")
+ .showcaseValueType("java.sql.Timestamp")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.legacy.JavaSqlTimeStampValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVATIMELOCALDATE(Config.builder()
+ .showcaseName("LocalDate")
+ .javaPackage("demoapp.dom.types.javatime.javatimelocaldate")
+ .showcaseValueType("java.time.LocalDate")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalDateValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVATIMELOCALDATETIME(Config.builder()
+ .showcaseName("LocalDateTime")
+ .javaPackage("demoapp.dom.types.javatime.javatimelocaldatetime")
+ .showcaseValueType("java.time.LocalDateTime")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalDateTimeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVATIMELOCALTIME(Config.builder()
+ .showcaseName("LocalTime")
+ .javaPackage("demoapp.dom.types.javatime.javatimelocaltime")
+ .showcaseValueType("java.time.LocalTime")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.LocalTimeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVATIMEOFFSETDATETIME(Config.builder()
+ .showcaseName("OffsetDateTime")
+ .javaPackage("demoapp.dom.types.javatime.javatimeoffsetdatetime")
+ .showcaseValueType("java.time.OffsetDateTime")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.OffsetDateTimeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVATIMEOFFSETTIME(Config.builder()
+ .showcaseName("OffsetTime")
+ .javaPackage("demoapp.dom.types.javatime.javatimeoffsetTime")
+ .showcaseValueType("java.time.OffsetTime")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.OffsetTimeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVATIMEZONEDDATETIME(Config.builder()
+ .showcaseName("ZonedDateTime")
+ .javaPackage("demoapp.dom.types.javatime.javatimezoneddatetime")
+ .showcaseValueType("java.time.ZonedDateTime")
+ .showcaseValueSemantics("org.apache.causeway.core.metamodel.valuesemantics.temporal.ZonedDateTimeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JAVAUTILDATE(Config.builder()
+ .showcaseName("JavaUtilDate")
+ .javaPackage("demoapp.dom.types.javautil.javautildate")
+ .showcaseValueType("java.util.Date")
+ .showcaseValueSemantics("org.apache.causeway.extensions.fullcalendar.applib.value.CalendarEventSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JODADATETIME(Config.builder()
+ .showcaseName("JodaDateTime")
+ .javaPackage("demoapp.dom.types.javatime.jodadatetime")
+ .showcaseValueType("org.joda.time.DateTime")
+ .showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaDateTimeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JODALOCALDATE(Config.builder()
+ .showcaseName("JodaLocalDate")
+ .javaPackage("demoapp.dom.types.javatime.jodalocaldate")
+ .showcaseValueType("org.joda.time.LocalDate")
+ .showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalDateValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JODALOCALDATETIME(Config.builder()
+ .showcaseName("JodaLocalDateTime")
+ .javaPackage("demoapp.dom.types.javatime.jodalocaldatetime")
+ .showcaseValueType("org.joda.time.LocalDateTime")
+ .showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalDateTimeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+ JODALOCALTIME(Config.builder()
+ .showcaseName("JodaLocalTime")
+ .javaPackage("demoapp.dom.types.javatime.jodalocaltime")
+ .showcaseValueType("org.joda.time.LocalTime")
+ .showcaseValueSemantics("org.apache.causeway.valuetypes.jodatime.integration.valuesemantics.JodaLocalTimeValueSemantics")
+ .templateVariant(TemplateVariant.DEFAULT)),
+
MARKUP(Config.builder()
.showcaseName("CausewayMarkup")
.javaPackage("demoapp.dom.types.causeway.markups")
diff --git a/tooling/metaprog/src/main/resources/$Templates-description.adoc b/tooling/metaprog/src/main/resources/$Templates-description.adoc
index e2df2c2eb7..adea212d55 100644
--- a/tooling/metaprog/src/main/resources/$Templates-description.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-description.adoc
@@ -10,7 +10,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `#{showcase-type}` datatype.
There is also an action that opens a view model; this view model also uses the `#{showcase-type}` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes
diff --git a/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc b/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
index f4624c487f..44a0b6ded6 100644
--- a/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
+++ b/tooling/metaprog/src/main/resources/$Templates-description~primitive.adoc
@@ -11,7 +11,7 @@ These can be used either in entities or view models.
On the left hand side is a collection of entities that uses the `#{showcase-type}` datatype.
There is also an action that opens a view model; this view model also uses the `#{showcase-type}` datatype.
-Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections.
+Navigate into the entity or view model to see the datatype used as a property, an action parameter and as a return type of collections, along with code samples.
=== Implementation Notes