This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch CAUSEWAY-3866 in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 1dab47595f37d089f99e3c0a2b603ed77ef44faa Author: Dan Haywood <[email protected]> AuthorDate: Fri Oct 17 11:35:47 2025 +0100 CAUSEWAY-3866: removes more jdo references --- .../applib/pages/index/annotation/Optionality.adoc | 2 +- .../hooks/Property_010-examples-and-usage.adoc | 17 +- .../annotation/hooks/Property_021-optionality.adoc | 39 +- .../refguide/modules/applib-ant/pages/Column.adoc | 121 +++--- .../2.0.0-M1/mignotes/removed-annotations.adoc | 2 +- .../eclipse/attachments/causeway-templates.xml | 465 --------------------- .../eclipse/attachments/jmock2-templates.xml | 43 -- .../eclipse/attachments/junit4-templates.xml | 36 -- .../images/2017-oxygen/010-lombok-locate-jar.png | Bin 71407 -> 0 bytes .../020-lombok-install-into-eclipse.png | Bin 41747 -> 0 bytes .../030-datanucleus-install-new-software.png | Bin 60520 -> 0 bytes .../040-datanucleus-specify-repository.png | Bin 8783 -> 0 bytes .../2017-oxygen/050-datanucleus-select-plugin.png | Bin 34002 -> 0 bytes .../060-enable-annotation-processor.png | Bin 31017 -> 0 bytes .../setupguide/modules/eclipse/pages/about.adoc | 204 +-------- .../modules/ROOT/partials/domain-entities/jpa.adoc | 21 +- .../ROOT/partials/meta-annotations/progmodel.adoc | 15 +- .../collections.adoc | 59 ++- .../properties-collections-actions/properties.adoc | 8 +- .../ROOT/partials/the-theory/metamodel.adoc | 2 +- .../causeway/applib/annotation/Optionality.java | 4 +- .../demoapp/todomodule/dom/ExcelDemoToDoItem.java | 15 - .../adoc/modules/asciidoc/pages/about.adoc | 12 - .../adoc/modules/markdown/pages/about.adoc | 14 +- valuetypes/vega/adoc/modules/vega/pages/about.adoc | 12 - 25 files changed, 173 insertions(+), 918 deletions(-) diff --git a/antora/components/refguide-index/modules/applib/pages/index/annotation/Optionality.adoc b/antora/components/refguide-index/modules/applib/pages/index/annotation/Optionality.adoc index eb284915b95..7986afc8f93 100644 --- a/antora/components/refguide-index/modules/applib/pages/index/annotation/Optionality.adoc +++ b/antora/components/refguide-index/modules/applib/pages/index/annotation/Optionality.adoc @@ -45,7 +45,7 @@ Ignore the value provided by this annotation (meaning that the framework will ke Default, usually meaning mandatory for properties and always meaning mandatory for parameters. -For properties, will be false unless JDO `javax.jdo.annotations.Column` has also specified with `javax.jdo.annotations.Column#allowsNull()` set to `true` . +For properties, will be false unless JPA `jakarta.persistence.Column#nullable()` is set to `true` . [#OPTIONAL] === OPTIONAL diff --git a/antora/components/refguide-index/modules/applib/pages/index/annotation/hooks/Property_010-examples-and-usage.adoc b/antora/components/refguide-index/modules/applib/pages/index/annotation/hooks/Property_010-examples-and-usage.adoc index 0d397c414fd..d4c030ba4aa 100644 --- a/antora/components/refguide-index/modules/applib/pages/index/annotation/hooks/Property_010-examples-and-usage.adoc +++ b/antora/components/refguide-index/modules/applib/pages/index/annotation/hooks/Property_010-examples-and-usage.adoc @@ -8,27 +8,30 @@ For example: [source,java] ---- +import jakarta.persistence.Column; + @DomainObject public class Customer { public static class EmailSpecification extends AbstractSpecification<String> { public String satisfiesSafely(String proposed) { - return EmailUtil.ensureValidEmail(proposed); // <1> + return EmailUtil.ensureValidEmail(proposed); // <.> } } - @javax.jdo.annotations.Column(allowsNull="true") // <2> + @@Column(nullable=true) // <.> @Property( maxLength=30, mustSatisfy=EmailSpecification.class, regexPattern = "(\\w+\\.)*\\w+@(\\w+\\.)+[A-Za-z]+", regexPatternFlags=Pattern.CASE_INSENSITIVE ) - public String getEmailAddress() { /* ... */ } - public void setEmailAddress(String emailAddress) { /* ... */ } - ... + @Getter @Setter + private String emailAddress; + + // ... } ---- -<1> the (fictitious) `EmailUtil.ensureValid(...)` (omitted for brevity) returns a string explaining if an email is invalid -<2> generally use instead of the `@Property#optionality` attribute +<.> the (fictitious) `EmailUtil.ensureValid(...)` (omitted for brevity) returns a string explaining if an email is invalid +<.> generally use instead of the `@Property#optionality` attribute diff --git a/antora/components/refguide-index/modules/applib/pages/index/annotation/hooks/Property_021-optionality.adoc b/antora/components/refguide-index/modules/applib/pages/index/annotation/hooks/Property_021-optionality.adoc index 3437b101268..baff5b7898c 100644 --- a/antora/components/refguide-index/modules/applib/pages/index/annotation/hooks/Property_021-optionality.adoc +++ b/antora/components/refguide-index/modules/applib/pages/index/annotation/hooks/Property_021-optionality.adoc @@ -18,12 +18,13 @@ For example: [source,java] ---- +import jakarta.persistence.Column; import lombok.Getter; import lombok.Setter; public class Customer { - @javax.jdo.annotations.Column(allowsNull="true") + @Column(nullable=true) @Getter @Setter private String middleInitial; @@ -41,30 +42,37 @@ Specifically, Causeway always assumes properties are mandatory, whereas JDO spec When Apache Causeway initializes it checks for these mismatches during its metamodel validation phase, and will fail to boot ("fail-fast") if there is a mismatch. The fix is usually to add the `@Column#nullable()` annotation/attribute. -== Superclass inheritance type +== 'Single table' inheritance type There is one case (at least) it may be necessary to annotate the property with both `@Column#nullable` and also `@Property#optionality()`. -If the property is logically mandatory and is in a subclass, but the mapping of the class hierarchy is to store both the superclass and subclass(es) into a single table (ie a "roll-up" mapping using `javax.jdo.annotations.InheritanceStrategy#SUPERCLASS_TABLE`), then JDO requires that the property is annotated as `@Column#nullable=true`: its value will be not defined for other subclasses. +If the property is logically mandatory and is in a subclass, but the mapping of the class hierarchy is to store both the superclass and subclass(es) into a single table (ie a "roll-up" mapping using `jakarta.persistence.InheritanceType#SINGLE_TABLE`), then JDO requires that the property is annotated as `@Column#nullable=true`: its value will be not defined for other subclasses. In this case we therefore require both annotations. [source,java] ---- [email protected] [email protected](strategy = InheritanceStrategy.NEW_TABLE) +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; + +@Entity +@Inheritance(type = InheritanceType.SINGLE_TABLE) public abstract class PaymentMethod { ... } [email protected] [email protected](strategy = InheritanceStrategy.SUPERCLASS_TABLE) + +@Entity +@Inheritance(type = InheritanceType.SINGLE_TABLE) public class CreditCardPaymentMethod extends PaymentMethod { private String cardNumber; - @javax.jdo.annotations.Column(allowsNull="true") + @Column(nullable=true) @Property(optionality=Optionality.MANDATORY) - public String getCardNumber() { return this.cardNumber; } - public void setCardNumber(String cardNumber) { this.cardNumber = cardNumber; } - ... + @Getter @Setter + private String cardNumber; + + // ... } ---- @@ -72,8 +80,13 @@ Alternatively, you could rely on the fact that Apache Causeway never looks at fi [source,java] ---- [email protected] [email protected](strategy = InheritanceStrategy.SUPERCLASS_TABLE) +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; + +@Entity +@Inheritance(type = InheritanceType.SINGLE_TABLE) public class CreditCardPaymentMethod extends PaymentMethod { @javax.jdo.annotations.Column(allowsNull="true") diff --git a/antora/components/refguide/modules/applib-ant/pages/Column.adoc b/antora/components/refguide/modules/applib-ant/pages/Column.adoc index f04ab36ad42..40103bb7000 100644 --- a/antora/components/refguide/modules/applib-ant/pages/Column.adoc +++ b/antora/components/refguide/modules/applib-ant/pages/Column.adoc @@ -19,17 +19,23 @@ This section identifies which attributes of `@Column` are recognized and used by [#nullability] == Nullability -ñ -The `allowsNull` attribute is used to specify if a property is mandatory or is optional. + +The `nullable` attribute is used to specify if a property is mandatory or is optional. For example: [source,java] ---- +import jakarta.persistence.Column; + public class Customer { - @jakarta.persistence.Column(nullable=true˜) - public String getMiddleInitial() { /* ... */ } - public void setMiddleInitial(String middleInitial) { /* ... */ } + + @Column(nullable=true) + @Getter @Setter + private String middleInitial; + + // ... +} ---- Causeway also provides xref:refguide:applib:index/annotation/Property.adoc#optionality[@Property#optionality] attribute. @@ -52,18 +58,27 @@ For example: [source,java] ---- +import jakarta.persistence.Column; + public class Customer { - @javax.jdo.annotations.Column(length=20) - public String getFirstName() { /* ... */ } - public void setFirstName(String firstName) { /* ... */ } - @javax.jdo.annotations.Column(allowsNull="true", length=1) - public String getMiddleInitial() { /* ... */ } - public void setMiddleInitial(String middleInitial) { /* ... */ } - @javax.jdo.annotations.Column(length=30) - public String getLastName() { /* ... */ } - public void setLastName(String lastName) { /* ... */ } + + @Column(length=20) + @Getter @Setter + private String firstName; + + @Column(length=1, nullable=true) + @Getter @Setter + private String middleInitial; + + @Column(length=30) + @Getter @Setter + private String lastName; + + // ... +} ---- + Apache Causeway also provides xref:refguide:applib:index/annotation/Property.adoc#maxLength[@Property#maxLength] attribute. If both are specified, Apache Causeway will check when it initializes for any contradictions, and will fail-fast with an appropriate error message in the log if there are. @@ -97,60 +112,72 @@ Unlike the sections above, the attributes specified in these hints and tips aren The `name` attribute can be used to override the name of the column. References to other objects are generally mapped as foreign key columns. -If there are multiple references to a given type, then you will want to override the name that JDO/DataNucleus would otherwise default. +If there are multiple references to a given type, then you will want to override the name that xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] would otherwise default. For example: [source,java] ---- +import jakarta.persistence.Column; + public class PartyRelationship { - @Column(name = "fromPartyId", allowsNull = "false") - public Party getFrom() { /* ... */ } - public void setFrom(Party from) { /* ... */ } - @Column(name = "toPartyId", allowsNull = "false") - public Party getTo() { /* ... */ } - public void setTo(Party to) { /* ... */ } - ... + + @Column(name = "fromPartyId", nullable = false) + @Getter @Setter + private Party from; + + @Column(name = "toPartyId", nullable = false) + @Getter @Setter + private Party to; + + // ... } ---- === Mapping ``Blob``s and ``Clob``s -Causeway provides custom value types for xref:refguide:applib:index/value/Blob.adoc[Blob]s and xref:refguide:applib:index/value/Clob.adoc[Clob]s. -These value types have multiple internal fields, meaning that they corresponding to multiple columns in the database. -Mapping this correctly requires using `@Column` within JDO's `@Persistent` annotation. +Causeway provides utility classes to help map xref:refguide:applib:index/value/Blob.adoc[Blob]s and xref:refguide:applib:index/value/Clob.adoc[Clob]s. For example, here's how to map a `Blob`: [source,java] ---- -private Blob attachment; [email protected](defaultFetchGroup="false", columns = { - @javax.jdo.annotations.Column(name = "attachment_name"), - @javax.jdo.annotations.Column(name = "attachment_mimetype"), - @javax.jdo.annotations.Column(name = "attachment_bytes", jdbcType = "BLOB", sqlType = "LONGVARBINARY") +@AttributeOverrides({ + @AttributeOverride(name="name", column=@Column(name="attachment_name")), + @AttributeOverride(name="mimeType",column=@Column(name="attachment_mimeType")), + @AttributeOverride(name="bytes", column=@Column(name="attachment_bytes")) }) -@Property( - domainEvent = AttachmentDomainEvent.class, - optionality = Optionality.OPTIONAL -) -public Blob getAttachment() { /* ... */ } -public void setAttachment(Blob attachment) { /* ... */ } +@Embedded +private BlobJpaEmbeddable attachment; + +@Property() +@PropertyLayout() +public Blob getPdf() { + return BlobJpaEmbeddable.toBlob(pdf); +} +public void setPdf(final Blob pdf) { + this.pdf = BlobJpaEmbeddable.fromBlob(pdf); +} ---- -And here's how to map a `Clob` (also taken from the todoapp): +And here's how to map a `Clob`: [source,java] ---- -private Clob doc; [email protected](defaultFetchGroup="false", columns = { - @javax.jdo.annotations.Column(name = "doc_name"), - @javax.jdo.annotations.Column(name = "doc_mimetype"), - @javax.jdo.annotations.Column(name = "doc_chars", jdbcType = "CLOB", sqlType = "LONGVARCHAR") +@AttributeOverrides({ + @AttributeOverride(name="name", column=@Column(name="doc_name")), + @AttributeOverride(name="mimeType",column=@Column(name="doc_mimeType")), + @AttributeOverride(name="bytes", column=@Column(name="doc_bytes")) }) -@Property( - optionality = Optionality.OPTIONAL -) -public Clob getDoc() { /* ... */ } -public void setDoc(final Clob doc) { /* ... */ } +@Getter @Setter +private ClobJpaEmbeddable doc; + +@Property() +@PropertyLayout() +public Clob getDoc() { + return ClobJpaEmbeddable.toClob(doc); +} +public void setDoc(final Clob doc) { + this.doc = ClobJpaEmbeddable.fromClob(doc); +} ---- diff --git a/antora/components/relnotes/modules/ROOT/partials/2018/2.0.0-M1/mignotes/removed-annotations.adoc b/antora/components/relnotes/modules/ROOT/partials/2018/2.0.0-M1/mignotes/removed-annotations.adoc index 10b95aeba54..a21cd2fd89d 100644 --- a/antora/components/relnotes/modules/ROOT/partials/2018/2.0.0-M1/mignotes/removed-annotations.adoc +++ b/antora/components/relnotes/modules/ROOT/partials/2018/2.0.0-M1/mignotes/removed-annotations.adoc @@ -139,7 +139,7 @@ Similarly, the `Bulk.InteractionContext` domain service is replaced with the lin | |Either link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant_Property_optionality[@Property#optionality()] or link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant_Parameter_optionality[@Parameter#optionality()]. -For properties, can also use link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant_Column_allowsNull[@Column#nullable()] +For properties, can also use link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant_Column_allowsNull[@Column#allowsNull()] Can also use link:https://isis.apache.org/versions/2.0.0-M1/guides/rgant/rgant.html#_rgant_Nullable[@Nullable] for either properties or parameters. |`@Mask` diff --git a/antora/components/setupguide/modules/eclipse/attachments/causeway-templates.xml b/antora/components/setupguide/modules/eclipse/attachments/causeway-templates.xml deleted file mode 100644 index 5316c749102..00000000000 --- a/antora/components/setupguide/modules/eclipse/attachments/causeway-templates.xml +++ /dev/null @@ -1,465 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<templates><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Action" enabled="true" name="isa">// {{ ${actionName} (action) -${:import(org.apache.isis.applib.annotation.MemberOrder)}@MemberOrder(sequence="1") -public ${ReturnType} ${actionName}(final ${ParameterType} ${parameterType}) { - return ${cursor}null; // TODO: business logic here -} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Action argument N choices" enabled="true" name="isacho">${:import(java.util.Collections,java.util.List)}public List<${ParameterType}> choices${ParameterNumThenCapitalizedActionName}() { - return ${cursor}Collections.emptyList(); // TODO: return list of choices for argument N -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Action argument defaults" enabled="true" name="isadef">public ${ParameterType} default${ParameterNumThenCapitalizedActionName}() { - return ${cursor}null; // TODO: return default for argument N -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Action disabling" enabled="true" name="isadis">public String disable${ActionName}() { - return ${cursor}null; // TODO: return reason why action disabled, null if enabled -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Action hiding" enabled="true" name="isahid">public boolean hide${ActionName}() { - return ${cursor}false; // TODO: return true if action is hidden, false if visible -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Action validation" enabled="true" name="isaval">public String validate${ActionName}(final ${ParameterType} ${parameterType}) { - return ${cursor}null; // TODO: return reason why action arguments are invalid, null if ok -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection (1:m bidir parent)" enabled="true" name="isc-1m">public void addTo${ChildCollectionName}(final ${ChildElementType} ${childElementName}) { - // check for no-op - if (${childElementName} == null || - get${ChildCollectionName}().contains(${childElementName})) { - return; - } - // dissociate arg from its current parent (if any). - ${childElementName}.clear${ParentPropertyNameInChild}(); - // associate arg - ${childElementName}.set${ParentPropertyNameInChild}(this); - get${ChildCollectionName}().add(${childElementName}); - // additional business logic - onAddTo${ChildCollectionName}(${childElementName}); -} -public void removeFrom${ChildCollectionName}(final ${ChildElementType} ${childElementName}) { - // check for no-op - if (${childElementName} == null || - !get${ChildCollectionName}().contains(${childElementName})) { - return; - } - // dissociate arg - ${childElementName}.set${ParentPropertyNameInChild}(null); - get${ChildCollectionName}().remove(${childElementName}); - // additional business logic - onRemoveFrom${ChildCollectionName}(${childElementName}); -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection (m:m bidir child)" enabled="true" name="isc-mmc">public void addTo${ParentCollectionName}(final ${ParentElementType} ${parentElementName}) { - // check for no-op - if (${parentElementName} == null || - get${ParentCollectionName}().contains(${parentElementName})) { - return; - } - // delegate to parent to add - ${parentElementName}.addTo${ChildCollectionNameInParent}(this); - // additional business logic - onAddTo${ParentCollectionName}(${parentElementName}); -} -public void removeFrom${ParentCollectionName}(final ${ParentElementType} ${parentElementName}) { - // check for no-op - if (${parentElementName} == null || - !get${ParentCollectionName}().contains(${parentElementName})) { - return; - } - // delegate to parent to remove - ${parentElementName}.removeFrom${ChildCollectionNameInParent}(this); - // additional business logic - onRemoveFrom${ParentCollectionName}(${parentElementName}); -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection (m:m bidir parent)" enabled="true" name="isc-mmp">public void addTo${ChildCollectionName}(final ${ChildElementType} ${childElementName}) { - // check for no-op - if (${childElementName} == null || - get${ChildCollectionName}().contains(${childElementName})) { - return; - } - // dissociate arg from its current parent (if any). - ${childElementName}.removeFrom${ParentCollectionNameInChild}(this); - // associate arg - ${childElementName}.get${ParentCollectionNameInChild}().add(this); - get${ChildCollectionName}().add(${childElementName}); - // additional business logic - onAddTo${ChildCollectionName}(${childElementName}); -} -public void removeFrom${ChildCollectionName}(final ${ChildElementType} ${childElementName}) { - // check for no-op - if (${childElementName} == null || - !get${ChildCollectionName}().contains(${childElementName})) { - return; - } - // dissociate arg - ${childElementName}.get${ParentCollectionNameInChild}().remove(this); - get${ChildCollectionName}().remove(${childElementName}); - // additional business logic - onRemoveFrom${ChildCollectionName}(${childElementName}); -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection disabling" enabled="true" name="iscdis">public String disable${CollectionName}() { - return ${cursor}null; // TODO: return reason why collection read-only, null if editable -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection hiding" enabled="true" name="ischid">public boolean hide${CollectionName}() { - return ${cursor}false; // TODO: return true if hidden, false otherwise -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection (list)" enabled="true" name="iscl">// {{ ${CollectionName} (Collection) -${:import(java.util.List,java.util.ArrayList,org.apache.isis.applib.annotation.MemberOrder)}private List<${ElementType}> ${collectionName} = new ArrayList<${ElementType}>(); -@MemberOrder(sequence="1") -public List<${ElementType}> get${CollectionName}() { - return ${collectionName}; -} -public void set${CollectionName}(final List<${ElementType}> ${collectionName}) { - this.${collectionName} = ${collectionName}; -} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection modify" enabled="true" name="iscmod">public void addTo${CollectionName}(final ${ElementType} ${elementName}) { - // check for no-op - if (${elementName} == null || - get${CollectionName}().contains(${elementName})) { - return; - } - // associate new - get${CollectionName}().add(${elementName}); - // additional business logic - onAddTo${CollectionName}(${elementName}); -} -public void removeFrom${CollectionName}(final ${ElementType} ${elementName}) { - // check for no-op - if (${elementName} == null || - !get${CollectionName}().contains(${elementName})) { - return; - } - // dissociate existing - get${CollectionName}().remove(${elementName}); - // additional business logic - onRemoveFrom${CollectionName}(${elementName}); -} -protected void onAddTo${CollectionName}(final ${ElementType} ${elementName}) { -} -protected void onRemoveFrom${CollectionName}(final ${ElementType} ${elementName}) { -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection (set)" enabled="true" name="iscs">// {{ ${CollectionName} (Collection) -${:import(java.util.Set,java.util.LinkedHashSet,org.apache.isis.applib.annotation.MemberOrder)}private Set<${ElementType}> ${collectionName} = new LinkedHashSet<${ElementType}>(); -@MemberOrder(sequence="1") -public Set<${ElementType}> get${CollectionName}() { - return ${collectionName}; -} -public void set${CollectionName}(final Set<${ElementType}> ${collectionName}) { - this.${collectionName} = ${collectionName}; -} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Collection validation" enabled="true" name="iscval">public String validateAddTo${CollectionName}(final ${ElementType} ${elementName}) { - return ${cursor}null; // TODO: return reason why argument cannot be added, null if ok to add -} -public String validateRemoveFrom${CollectionName}(final ${ElementType} ${elementName}) { - return null; // TODO: return reason why argument cannot be removed, null if ok to remove -} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Dependencies region" enabled="true" name="isd">// {{ injected dependencies -${cursor} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Dependencies - injected service" enabled="true" name="isds">// {{ injected: ${ServiceType} -private ${ServiceType} ${serviceType}; -public void set${ServiceType}(final ${ServiceType} ${serviceType}) { - this.${serviceType} = ${serviceType}; -} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Factory - new instance (persistent)" enabled="true" name="isfp">// {{ Create new (already persisted) ${Type} -public ${Type} new${Type}() { - ${Type} ${type} = newTransientInstance(${Type}.class); - ${cursor}// TODO: set up any properties - - persist(${type}); - return ${type}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Factory - new instance (transient)" enabled="true" name="isft">// {{ Create new (still transient) ${Type} -public ${Type} new${InstanceOfType}() { - ${Type} ${type} = newTransientInstance(${Type}.class); - ${cursor}// TODO: set up any properties - - return ${type}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Identification region" enabled="true" name="isid">// {{ Identification -${cursor} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Identification - icon" enabled="true" name="isidicon">public String iconName() { - return ${cursor}null; // TODO: return name of image file (without suffix) -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Identification - title" enabled="true" name="isidtitle">public String title() { - ${:import(org.apache.isis.applib.util.TitleBuffer)}final TitleBuffer buf = new TitleBuffer(); - ${cursor}// TODO: append to TitleBuffer, typically value properties - return buf.toString(); -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="JDO Collection (1:n bidir, foreign key)" enabled="true" name="isjdc-1n-b-fk">// {{ ${CollectionName} (Collection) -${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}") -private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>(); -@MemberOrder(sequence="1") -public SortedSet<${ElementType}> get${CollectionName}() { -return ${collectionName}; -} -public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) { -this.${collectionName} = ${collectionName}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="JDO Collection (1:n bidir, join table)" enabled="true" name="isjdc-1n-b-jt">// {{ ${CollectionName} (Collection) -${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persitent,javax.jdo.annotations.Join)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}") -@Join -private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>(); -@MemberOrder(sequence="1") -public SortedSet<${ElementType}> get${CollectionName}() { -return ${collectionName}; -} -public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) { -this.${collectionName} = ${collectionName}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="JDO Collection (1:n unidir, foreign key)" enabled="true" name="isjdc-1n-u-fk">// {{ ${CollectionName} (Collection) -${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Element)} -@Element(column="${ColumnName}", dependent="${trueOrFalse}") -private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>(); -@MemberOrder(sequence="1") -public SortedSet<${ElementType}> get${CollectionName}() { -return ${collectionName}; -} -public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) { -this.${collectionName} = ${collectionName}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="JDO Collection (1:n unidir, join table)" enabled="true" name="isjdc-1n-u-jt">// {{ ${CollectionName} (Collection) -${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Join -@Element(dependent="${trueOrFalse}") -private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>(); -@MemberOrder(sequence="1") -public SortedSet<${ElementType}> get${CollectionName}() { -return ${collectionName}; -} -public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) { -this.${collectionName} = ${collectionName}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="JDO Collection (m:n bidir - child)" enabled="true" name="isjdc-mn-ub-c">// {{ ${CollectionName} (Collection) -${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${ChildCollectionNameInParent}") -private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>(); -public SortedSet<${ElementType}> get${CollectionName}() { -return ${collectionName}; -} -public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) { -this.${collectionName} = ${collectionName}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="JDO Collection (m:n unidir & bidir - parent)" enabled="true" name="isjdc-mn-ub-p">// {{ ${CollectionName} (Collection) -${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Persistent(table="${TableName}") -@Join(column="${ThisEntityFieldName}") -@Element(column="${RelatedEntityFieldName}") -private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();@MemberOrder(sequence="1") - -public SortedSet<${ElementType}> get${CollectionName}() { - return ${collectionName}; -} -public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) { - this.${collectionName} = ${collectionName}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="JDO Property (simple - 1:1 unidir & bidir - parent)" enabled="true" name="isjdp">// {{ ${PropertyName} (property) -private ${PropertyType} ${propertyName}; -${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column)}@MemberOrder(sequence="1") -@Column(allowsNull="${trueOrFalse}") -public ${PropertyType} get${PropertyName}() { - return ${propertyName}; -} -public void set${PropertyName}(final ${PropertyType} ${propertyName}) { - this.${propertyName} = ${propertyName}; -} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="JDO Property (1:1 child)" enabled="true" name="isjdp-11c">// {{ ${PropertyName} (property) -private ${PropertyType} ${propertyName}; -${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column,javax.jdo.annotations.Persistent)}@MemberOrder(sequence="1") -@Column(allowsNull="${trueOrFalse}") -@Persistent(mappedBy="${fieldOnChild}") -public ${PropertyType} get${PropertyName}() { - return ${propertyName}; -} -public void set${PropertyName}(final ${PropertyType} ${propertyName}) { - this.${propertyName} = ${propertyName}; -} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Lifecycle region" enabled="true" name="isl">// {{ Lifecycle methods -${cursor} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Lifecycle - create" enabled="true" name="islc">public void created() { - ${cursor}// TODO: post-create -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Lifecycle - load" enabled="true" name="isll">public void loading() { - ${cursor}// TODO: pre-load -} -public void loaded() { - // TODO: post-load -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Lifecycle - persist" enabled="true" name="islp">public void persisting() { - ${cursor}// TODO: pre-persist -} -public void persisted() { - // TODO: post-persist -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Lifecycle - remove" enabled="true" name="islr">public void removing() { - ${cursor}// TODO: pre-remove -} -public void removed() { - // TODO: post-remove -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Lifecycle - update" enabled="true" name="islu">public void updating() { - ${cursor}// TODO: pre-update -} -public void updated() { - // TODO: post-update -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property" enabled="true" name="isp">// {{ ${PropertyName} (property) -private ${PropertyType} ${propertyName}; -${:import(org.apache.isis.applib.annotation.MemberOrder)}@MemberOrder(sequence="1") -public ${PropertyType} get${PropertyName}() { - return ${propertyName}; -} -public void set${PropertyName}(final ${PropertyType} ${propertyName}) { - this.${propertyName} = ${propertyName}; -} -// }} - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property (1:1 bidir child)" enabled="true" name="isp-11c">public void modify${ParentPropertyName}(final ${ParentPropertyType} ${parentPropertyName}) { - ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}(); - // check for no-op - if (${parentPropertyName} == null || - ${parentPropertyName}.equals(current${ParentPropertyName})) { - return; - } - // delegate to parent to associate - ${parentPropertyName}.modify${ChildPropertyNameInParent}(this); - // additional business logic - onModify${ParentPropertyName}(current${ParentPropertyName}, ${parentPropertyName}); -} -public void clear${PropertyName}() { - ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}(); - // check for no-op - if (current${ParentPropertyName} == null) { - return; - } - // delegate to parent to dissociate - current${ParentPropertyName}.clear${ChildPropertyNameInParent}(); - // additional business logic - onClear${ParentPropertyName}(current${ParentPropertyName}); -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property (1:1 bidir parent)" enabled="true" name="isp-11p">public void modify${ChildPropertyName}(final ${ChildPropertyType} ${childPropertyName}) { - ${ChildPropertyType} current${ChildPropertyName} = get${ChildPropertyName}(); - // check for no-op - if (${childPropertyName} == null || - ${childPropertyName}.equals(current${ChildPropertyName})) { - return; - } - // dissociate existing - clear${ChildPropertyName}(); - // associate new - ${childPropertyName}.set${ParentPropertyNameInChild}(this); - set${ChildPropertyName}(${childPropertyName}); - // additional business logic - onModify${ChildPropertyName}(current${ChildPropertyName}, ${childPropertyName}); -} -public void clear${ChildPropertyName}() { - ${ChildPropertyType} current${ChildPropertyName} = get${ChildPropertyName}(); - // check for no-op - if (current${ChildPropertyName} == null) { - return; - } - // dissociate existing - current${ChildPropertyName}.set${ParentPropertyNameInChild}(null); - set${ChildPropertyName}(null); - // additional business logic - onClear${ChildPropertyName}(current${ChildPropertyName}); -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property (m:1 bidir child)" enabled="true" name="isp-m1">public void modify${ParentPropertyName}(final ${ParentPropertyType} ${parentPropertyName}) { - ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}(); - // check for no-op - if (${parentPropertyName} == null || - ${parentPropertyName}.equals(current${ParentPropertyName})) { - return; - } - // delegate to parent to associate - ${parentPropertyName}.addTo${ChildCollectionNameInParent}(this); - // additional business logic - onModify${ParentPropertyName}(current${ParentPropertyName}, ${parentPropertyName}); -} -public void clear${ParentPropertyName}() { - ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}(); - // check for no-op - if (current${ParentPropertyName} == null) { - return; - } - // delegate to parent to dissociate - current${ParentPropertyName}.removeFrom${ChildCollectionNameInParent}(this); - // additional business logic - onClear${ParentPropertyName}(current${ParentPropertyName}); -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property choices" enabled="true" name="ispcho">${:import(java.util.List)}public List<${PropertyType}> choices${PropertyName}() { - return ${cursor}null; // TODO: return list of choices for property -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property defaults" enabled="true" name="ispdef">public ${PropertyType} default${PropertyName}() { - return ${cursor}null; // TODO: return default for property when first created -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property disabling" enabled="true" name="ispdis">public String disable${PropertyName}() { - return ${cursor}null; // TODO: return reason why property is disabled, null if editable -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property hiding" enabled="true" name="isphid">public boolean hide${PropertyName}() { - return ${cursor}false; // TODO: return true if hidden, false if visible -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property modify" enabled="true" name="ispmod">public void modify${PropertyName}(final ${PropertyType} ${propertyName}) { - ${PropertyType} current${PropertyName} = get${PropertyName}(); - // check for no-op - if (${propertyName} == null || - ${propertyName}.equals(current${PropertyName})) { - return; - } - // associate new - set${PropertyName}(${propertyName}); - // additional business logic - onModify${PropertyName}(current${PropertyName}, ${propertyName}); -} -public void clear${PropertyName}() { - ${PropertyType} current${PropertyName} = get${PropertyName}(); - // check for no-op - if (current${PropertyName} == null) { - return; - } - // dissociate existing - set${PropertyName}(null); - // additional business logic - onClear${PropertyName}(current${PropertyName}); -} -protected void onModify${PropertyName}(final ${PropertyType} old${PropertyName}, final ${PropertyType} new${PropertyName}) { -} -protected void onClear${PropertyName}(final ${PropertyType} old${PropertyName}) { -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Property validation" enabled="true" name="ispval">public String validate${PropertyName}(final ${PropertyType} ${propertyName}) { - if (${propertyName} == null) return null; - return ${cursor}null; // TODO: return reason why proposed value is invalid, null if valid -}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Isis Section" enabled="true" name="iss">// {{ ${SectionName} -${cursor} -// }}</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Search for all" enabled="true" name="issa">// {{ all ${TypePlural} -${:import(org.apache.isis.applib.annotation.Exploration,java.util.List)}@Exploration -public List<${Type}> all${TypePlural}() { - return allInstances(${Type}.class); -} -// }} - - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Search for all matching" enabled="true" name="issafil">// {{ all ${TypePlural} that ${filterDescription} -${:import(org.apache.isis.applib.annotation.Exploration,org.apache.isis.applib.Filter,java.util.List)}@Exploration -public List<${Type}> all${TypePlural}Matching(final Filter<${Type}> filter) { - return allMatches(${Type}.class, filter); -} -// }} - - -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Search for first matching" enabled="true" name="issffil">// {{ first ${Type} that ${filterDescription} -${:import(org.apache.isis.applib.annotation.Exploration,org.apache.isis.applib.Filter,java.util.List)}@Exploration -public ${Type} first${Type}Matching(final Filter<${Type}> filter) { - return firstMatch(${Type}.class, filter); -} -// }} -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Search for unique matching" enabled="true" name="issufil">// {{ unique ${Type} that ${filterDescription} -${:import(org.apache.isis.applib.annotation.Exploration,org.apache.isis.applib.Filter,java.util.List)}@Exploration -public ${Type} unique${Type}Matching(final Filter<${Type}> filter) { - return uniqueMatch(${Type}.class, filter); -} -// }} -</template><template autoinsert="true" context="java-pathsToInclude" deleted="false" description="Object-level validation" enabled="true" name="isval">public String validate() { - ${cursor}// TODO: return reason why object is in invalid state (and so cannot be saved/updated), or null if ok -}</template></templates> diff --git a/antora/components/setupguide/modules/eclipse/attachments/jmock2-templates.xml b/antora/components/setupguide/modules/eclipse/attachments/jmock2-templates.xml deleted file mode 100644 index 8205c8f4098..00000000000 --- a/antora/components/setupguide/modules/eclipse/attachments/jmock2-templates.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor - license agreements. See the NOTICE file distributed with this work for additional - information regarding copyright ownership. The ASF licenses this file to - you under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required - by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or implied. See the License for the specific - language governing permissions and limitations under the License. ---> -<templates> - <template autoinsert="true" context="java" deleted="false" description="JMock2 AutoMock Definition" enabled="true" - name="jmautomock">${:import(org.jmock.auto.Mock)}@Mock - private ${MockClass} mock${MockClass}; - </template> - <template autoinsert="true" context="java" deleted="false" description="JMock2 Context field" enabled="true" - name="jmcontext">${:import(org.jmock.Mockery,org.jmock.integration.junit4.JUnit4Mockery)}private Mockery - context = new JUnit4Mockery(); - </template> - <template autoinsert="true" context="java" deleted="false" description="JMock2 Expectations" enabled="true" - name="jmexpectations">${:import(org.jmock.Expectations)}context.checking(new Expectations() {{ - ${cursor} - }}); - </template> - <template autoinsert="true" context="java" deleted="false" description="JMock2 Mock Definition" enabled="true" - name="jmmock">${MockClass} ${mockObject} = context.mock(${MockClass}.class); - </template> - <template autoinsert="true" context="java" deleted="false" description="JMock2 Rule (Isis variant)" enabled="true" - name="jmrule"> - ${:import(org.junit.Rule,org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2,org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode)}@Rule - public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES${cursor}); - - </template> - <template autoinsert="true" context="java" deleted="false" description="JMock2 RunWith" enabled="true" - name="jmrunwith"> - ${:import(org.junit.runner.RunWith,org.jmock.integration.junit4.JMock)}@RunWith(JMock.class) - </template> - <template autoinsert="true" context="java" deleted="false" description="JMock2 Expectation Return Value" - enabled="true" name="jmvalue">will(returnValue(${cursor})); - </template> -</templates> \ No newline at end of file diff --git a/antora/components/setupguide/modules/eclipse/attachments/junit4-templates.xml b/antora/components/setupguide/modules/eclipse/attachments/junit4-templates.xml deleted file mode 100644 index c236831288f..00000000000 --- a/antora/components/setupguide/modules/eclipse/attachments/junit4-templates.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor - license agreements. See the NOTICE file distributed with this work for additional - information regarding copyright ownership. The ASF licenses this file to - you under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required - by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or implied. See the License for the specific - language governing permissions and limitations under the License. ---> -<templates> - <template autoinsert="true" context="java" deleted="false" description="JUnit4 After Method" enabled="true" - name="juafter">${:import(org.junit.After)}@After - public void tearDown() throws Exception { - ${cursor} - } - </template> - <template autoinsert="true" context="java" deleted="false" description="JUnit4 AssertThat" enabled="true" - name="juassertThat"> - ${:importStatic(org.junit.Assert.assertThat,'org.hamcrest.CoreMatchers.*')}assertThat(${object}, ${matcher}); - </template> - <template autoinsert="true" context="java" deleted="false" description="JUnit4 Before Method" enabled="true" - name="jubefore">${:import(org.junit.Before)}@Before - public void setUp() throws Exception { - ${cursor} - } - </template> - <template autoinsert="true" context="java" deleted="false" description="JUnit4 Test Method" enabled="true" - name="jutest">${:import(org.junit.Test)}@Test - public void ${xxx}() throws Exception { - ${cursor} - } - </template> -</templates> \ No newline at end of file diff --git a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/010-lombok-locate-jar.png b/antora/components/setupguide/modules/eclipse/images/2017-oxygen/010-lombok-locate-jar.png deleted file mode 100644 index 08b2ddc2567..00000000000 Binary files a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/010-lombok-locate-jar.png and /dev/null differ diff --git a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/020-lombok-install-into-eclipse.png b/antora/components/setupguide/modules/eclipse/images/2017-oxygen/020-lombok-install-into-eclipse.png deleted file mode 100644 index d3ad1a954be..00000000000 Binary files a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/020-lombok-install-into-eclipse.png and /dev/null differ diff --git a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/030-datanucleus-install-new-software.png b/antora/components/setupguide/modules/eclipse/images/2017-oxygen/030-datanucleus-install-new-software.png deleted file mode 100644 index 3bc53f5d571..00000000000 Binary files a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/030-datanucleus-install-new-software.png and /dev/null differ diff --git a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/040-datanucleus-specify-repository.png b/antora/components/setupguide/modules/eclipse/images/2017-oxygen/040-datanucleus-specify-repository.png deleted file mode 100644 index 59523605c57..00000000000 Binary files a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/040-datanucleus-specify-repository.png and /dev/null differ diff --git a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/050-datanucleus-select-plugin.png b/antora/components/setupguide/modules/eclipse/images/2017-oxygen/050-datanucleus-select-plugin.png deleted file mode 100644 index 913cd34e12f..00000000000 Binary files a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/050-datanucleus-select-plugin.png and /dev/null differ diff --git a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/060-enable-annotation-processor.png b/antora/components/setupguide/modules/eclipse/images/2017-oxygen/060-enable-annotation-processor.png deleted file mode 100644 index 4777c4a029d..00000000000 Binary files a/antora/components/setupguide/modules/eclipse/images/2017-oxygen/060-enable-annotation-processor.png and /dev/null differ diff --git a/antora/components/setupguide/modules/eclipse/pages/about.adoc b/antora/components/setupguide/modules/eclipse/pages/about.adoc index 1bda73a87e6..5bd76978d83 100644 --- a/antora/components/setupguide/modules/eclipse/pages/about.adoc +++ b/antora/components/setupguide/modules/eclipse/pages/about.adoc @@ -7,18 +7,6 @@ If you are an http://www.eclipse.org[Eclipse] user, then we recommend you downlo -//== Editor Templates -// -//We provide a set of editor templates. -//These are used to add new methods to existing classes. -//(These are equivalent to the xref:setupguide:intellij:about.adoc#live-templates[IntelliJ live templates]): -// -//* `is` (Apache Causeway domain objects). link:./resources/eclipse/causeway-templates.xml[Download] -//* `ju` (for JUnit tests) link:./resources/eclipse/junit4-templates.xml[Download] -//* `jm` (for JMock mocks or libraries) link:./resources/eclipse/jmock2-templates.xml[Download] -// -// -//To install, download each XML file, then go to `Windows > Preferences > Java > Editor > Templates` and choose `Import`. == Prerequisites @@ -30,50 +18,6 @@ For Eclipse IDE this requires an link:https://projectlombok.org/setup/eclipse[in image::2023-sts/1.png[] -// Alternatively, you can download the `lombok.jar` from the link:https://projectlombok.org/[projectlombok.org] website, and install manually. -// -// * Locate the `lombok.jar` jar file: -// -// + -// image::2017-oxygen/010-lombok-locate-jar.png[width="600px"] -// -// * Run using `java -jar` (or double click on Windows): -// -// + -// image::2017-oxygen/020-lombok-install-into-eclipse.png[width="600px"] -// -// Then restart Eclipse. - - -=== (JDO only) Install the DataNucleus plugin - -If using JDO persistence (rather than JPA), then it's necessary to setup the development environment so that the Java bytecode can be enhanced by the link:http://www.datanucleus.org[DataNucleus] enhancer. - -If using Eclipse, then JDO enhancement is most easily done by installing the http://www.datanucleus.org/products/accessplatform/jpa/tools.html#eclipse[DataNucleus' Eclipse plugin]. -This hooks the bytecode enhancement of your domain objects into Eclipse's normal incremental compilation. - -This plugin needs to be configured for each of your domain modules (usually just one in any given app). - -The DataNucleus plugin hooks into the Eclipse compiler and will automatically enhance the compiled class files: - -* Use Help > Install New Software: - -+ -image::2017-oxygen/030-datanucleus-install-new-software.png[width="600px"] - -* Specify the DataNucleus plugin repository: - -+ -image::2017-oxygen/040-datanucleus-specify-repository.png[width="400px"] - -* Select the plugin - -+ -image::2017-oxygen/050-datanucleus-select-plugin.png[width="600px"] - -* Press Next and Finish to complete the installation of the plugin - -Then restart Eclipse == Importing the Project @@ -84,8 +28,6 @@ image::2023-sts/3.png[] image::2023-sts/4.png[] image::2023-sts/7.png[] -WARNING: at this point the IDE hung, apparently hitting a deadlock (as of 2023). -I had to kill the IDE and restart, reimporting the already cloned repo. Importing: @@ -96,96 +38,6 @@ image::2023-sts/8.png[] -// commented out, as of 2023 at least (and probably more recently) this is now automatically done. -// However, you will have some compile errors until you enable annotation processing, discussed below. -// -// [#enable-annotation-processing] -// === Enable Annotation Processing -// -// -// -// Project Lombok (and DataNucleus enhancer) uses annotation processors that must be enabled in Eclipse. -// -// For each project, open its _Properties_ page and then _Java Compiler > Annotation Processing_ to specify the generated source directory of `target/generated-sources/annotations`: -// -// image::2017-oxygen/060-enable-annotation-processor.png[width="600px"] -// -// If your eclipse version also requires you to enter a generated test source directory, specify the following directory: `target/generated-test-sources/test-annotations`. -// -// Then under _Java Compiler > Annotation Processing > Factory Path_ add the following external JARs (for instance from your local `.m2` maven repository) -// -// * `datanucleus-jdo-query-5.0.9.jar` (under `.m2/repository/org/datanucleus/datanucleus-jdo-query/5.0.9`) -// * `javax.jdo-3.2.0-m13.jar` (under `.m2/repository/org/datanucleus/javax.jdo/3.2.0-m13`) -// -// The specific versions depend on the DataNucleus version used in your project.You can easily check this in the Dependency Hierarchy tab of the POM.xml viewer in eclipse. -// -// Eclipse should automatically add these directories as a source path; at this point all remaining compiler errors should disappear. -// -// If the JDO Q-files are not generated automatically into the specified source directory then check the `.log` file in your eclipse workspace to see if there are any `ClassNotFoundException`s that could indicate why the DataNucleus annotation processor is failing. -// -// A healthy DataNucleus Annotation Process execution in your eclipse `.log` file should look like this: -// -// [source] -// ---- -// !ENTRY org.eclipse.jdt.apt.pluggable.core 1 1 2020-11-06 19:28:41.948 -// !MESSAGE DataNucleus JDO AnnotationProcessor for generating JDOQLTypedQuery Q classes -// ---- -// -// An error might look like this: -// -// [source] -// ---- -// !ENTRY org.eclipse.jdt.apt.pluggable.core 4 1 2020-11-06 18:52:30.688 -// !MESSAGE Exception thrown by Java annotation processor org.datanucleus.jdo.query.JDOQueryProcessor@60e3ac5d -// !STACK 0 -// java.lang.Exception: java.lang.NoClassDefFoundError: javax/jdo/query/PersistableExpression -// ---- -// -// If you see this specific error message then check that you added the `javax.jdo` JAR that matches the version of DataNucleus used in your project (see _Factory Path_ configuration above). - - - - - -== JDO - -*_This section applies if you are using JDO (rather than JPA) as the ORM of your application._* - - -=== Configure DataNucleus Enhancer - -[TIP] -==== -Make sure you are in the 'Java' Perspective, not the 'Java EE' Perspective. -==== - -In Eclipse, for the _domain object model_ project(s), first add DataNucleus support: - -image::eclipse-100-project-support.png[width="600px"] - - -Then turn on Auto-Enhancement: - -image::eclipse-110-project-support.png[width="600px"] - -=== Update the classpath - -DataNucleus' enhancer uses the domain object model's own classpath to reference DataNucleus JARs. -So, even though your domain objects are unlikely to depend on DataNucleus, these references must still be present. - -If you've based your app on either the xref:docs:starters:helloworld.adoc[HelloWorld] or the xref:docs:starters:simpleapp.adoc[SimpleApp] starter app, then it'll be set up already. - -Then, tell DataNucleus to use the project classpath: - -image::eclipse-010-windows-preferences.png[width="750px"] - -When the enhancer runs, it will print out to the console: - -image::eclipse-120-console.png[width="500px"] - -CAUTION: If you hit issues with path limits, then see the section xref:#workaround-for-path-limits-the-dn-plugin-to-use-the-persistence-xml[below]. - - [#running-the-app] == Running the App @@ -199,7 +51,7 @@ image::2023-sts/9.png[] + image::2023-sts/A.png[] -If running *JPA*, then you should enable weaving: +If your application uses the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] object store, then you should enable weaving: * change `eclipselink.weaving` property to `true` in `application.yml` file: + @@ -222,57 +74,3 @@ image::2023-sts/E.png[] The app should be accessible at link:http://localhost:8080[] - -[#workaround-for-path-limits-the-dn-plugin-to-use-the-persistence-xml] -== JDO : Workaround for path limits (the DN plugin to use the persistence.xml) - -If running on Windows then the DataNucleus plugin is very likely to hit the Windows path limit. - -To fix this, we configure the enhancer to read from the `persistence.xml` file. - -As a prerequisite, first make sure that your domain object model has a `persistence.xml` file. -Then specify the `persistence-unit` in the project properties: - -image::eclipse-025-project-properties.png[width="750px"] - -=== Workaround: If the enhancer fails - -On occasion it appears that Eclipse can attempt to run two instances of the DataNucleus enhancer. -This is probably due to multiple Eclipse builders being defined; we've noticed multiple entries in the Eclipse's `Debug` view: - - -image::eclipse-210-enhancer-fails-duplicates.png[width="600px"] - - -At any rate, you'll know you've encountered this error if you see the following in the console: - - -image::eclipse-200-enhancer-fails-duplicates.png[width="600px"] - - - -The best solution is to remove DataNucleus support and then to re-add it: - - -image::eclipse-220-enhancer-fails-duplicates.png[width="600px"] - - -If you consistently hit problems, then the final recourse is to disable the automatic enhancement and to remember to manually enhance your domain object model before each run. - - - -//== Advanced -// -//In this section are a couple of options that will reduce the length of the change code/build/deploy/review feedback loop. -// -//=== Setting up DCEVM -// -//link:http://github.com/dcevm/dcevm[DCEVM] enhances the JVM with true hot-swap adding/removing of methods as well as more reliable hot swapping of the implementation of existing methods. -// -//In the context of Apache Causeway, this is very useful for contributed actions and mixins and also view models; you should then be able to write these actions and have them be picked up without restarting the application. -// -//Changing persisting domain entities is more problematic becaue at runtime the JPA persistence mechanism would need to rebuild its own metamodel. -//You may find that adding actions will work, but adding new properties or collections is much less likely to. -// -//For details of setting up DCEVM, see the xref:setupguide:intellij:hints-and-tips.adoc#setting-up-dcevm[corresponding section] in the IntelliJ documentation. - diff --git a/antora/components/userguide/modules/ROOT/partials/domain-entities/jpa.adoc b/antora/components/userguide/modules/ROOT/partials/domain-entities/jpa.adoc index b4da39de0f9..25feb8399e3 100644 --- a/antora/components/userguide/modules/ROOT/partials/domain-entities/jpa.adoc +++ b/antora/components/userguide/modules/ROOT/partials/domain-entities/jpa.adoc @@ -65,30 +65,27 @@ This is often used in database unique indices, and in the `toString()` implement [source,java] ---- -import javax.persistence.Column; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import lombok.ToString.Include; +import jakarta.persistence.*; +import lombok.*; [email protected]( +@Table( schema= SimpleModule.SCHEMA, uniqueConstraints = { @UniqueConstraint(name = "SimpleObject__name__UNQ", - columnNames = {"name"}) // <.> + columnNames = {"name"}) // <.> } ) public class SimpleObject - implements Comparable<SimpleObject> { // <.> + implements Comparable<SimpleObject> { // <.> // ... public SimpleObject(String name) { setName(name); } - @Column(allowsNull="false", length=50) // <.> - @Getter @Setter // <.> - @ToString.Include // <.> + @Column(nullable=false, length=50) // <.> + @Getter @Setter // <.> + @ToString.Include // <.> private String name; private final static Comparator<SimpleObject> comparator = @@ -96,7 +93,7 @@ public class SimpleObject @Override public int compareTo(final SimpleObject other) { - return comparator.compare(this, other); // <.> + return comparator.compare(this, other); // <.> } } ---- diff --git a/antora/components/userguide/modules/ROOT/partials/meta-annotations/progmodel.adoc b/antora/components/userguide/modules/ROOT/partials/meta-annotations/progmodel.adoc index cd743a9175e..3888b811a22 100644 --- a/antora/components/userguide/modules/ROOT/partials/meta-annotations/progmodel.adoc +++ b/antora/components/userguide/modules/ROOT/partials/meta-annotations/progmodel.adoc @@ -12,7 +12,7 @@ The xref:docs:starters:simpleapp.adoc[SimpleApp] starter app illustrates the usa [source,java] .Name.java ---- -@Column(length = Name.MAX_LEN, allowsNull = "false") // <.> +@Column(length = Name.MAX_LEN, nullable = false) // <.> @Property(mustSatisfy = Name.Specification.class, // <.> maxLength = Name.MAX_LEN) @Parameter(mustSatisfy = Name.Specification.class, // <.> @@ -93,16 +93,15 @@ The table below summarises the equivalence of some of the most common cases. |@Property(maxLength=50) + @Parameter(maxLength=50) | [email protected](length=50) [email protected](length=50) |big decimal (precision) -|@javax.validation.constraints.Digits(fraction=2) -|@javax.persistence.Column(scale=2) [email protected](scale=2) +|@jakarta.validation.constraints.Digits(fraction=2) +|@jakarta.persistence.Column(scale=2) |optionality -|`@javax.annotation.Nullable` or `ParameterLayout(optionality=OPTIONAL`) -|`@javax.persistence.Column(nullable=true)` -`@javax.jdo.annotations.Column(allowsNull="true")` +|`@jakarta.annotation.Nullable` or `ParameterLayout(optionality=OPTIONAL`) +|`@jakarta.persistence.Column(nullable=true)` +`@jakarta.persistence.Basic(optional=true)` |=== diff --git a/antora/components/userguide/modules/ROOT/partials/properties-collections-actions/collections.adoc b/antora/components/userguide/modules/ROOT/partials/properties-collections-actions/collections.adoc index d4eeb2e1a64..7410a6cf757 100644 --- a/antora/components/userguide/modules/ROOT/partials/properties-collections-actions/collections.adoc +++ b/antora/components/userguide/modules/ROOT/partials/properties-collections-actions/collections.adoc @@ -18,8 +18,8 @@ And collections properties will also have a number of annotations: * Apache Causeway defines its own xref xref:refguide:applib:index/annotation/Collection.adoc[@Collection] annotation for capturing domain semantics. It also provides a xref:refguide:applib:index/annotation/CollectionLayout.adoc[@CollectionLayout] for UI hints (though the information in this annotation may instead be provided by a supplementary xref:userguide:ROOT:ui-layout-and-hints.adoc#object-layout[.layout.xml] file) -* the collections of domain entities will typically be annotated with ORM annotation(s). -In the case of xref:pjpa:ROOT:about.adoc[JPA/Eclipselink], this is most notably `jakarta.persistence.Entity`. +* the collections of domain entities will typically be annotated with ORM annotation(s), such as + `jakarta.persistence.Entity`. The collection itself will likely have its own ORM-specific annotations, to specify for example if the association is bidirectional, supports cascading deletes, or whether to define a link table or not to hold foreign key columns. * for the collections of view models, then JAXB annotations such as link:https://docs.oracle.com/javase/7/docs/api/javax/xml/bind/annotation/XmlElementWrapper.html[@javax.xml.bind.annotation.XmlElementWrapper] and link:https://docs.oracle.com/javase/7/docs/api/javax/xml/bind/annotation/XmlElement.html[@javax.xml.bind.annotation.XmlElement] will be present @@ -53,51 +53,64 @@ In the parent object, the collection can be defined as: [source,java] ---- -import javax.jdo.annotations.Persistent; +import jakarta.persistence.OneToMany; import lombok.Getter; -import lombok.Setter; public class ParentObject - implements Comparable<ParentObject>{ - - @Persistent( - mappedBy = "parent", // <.> - dependentElement = "false" // <.> + implements Comparable<ParentObject> { + + @Id // <.> + @GeneratedValue(strategy = GenerationType.AUTO) + @Column(name = "id", nullable = false) + private Long id; + + @Getter + @OneToMany( + mappedBy = "parent", // <.> + cascade = CascadeType.ALL, // <.> + orphanRemoval = true ) - @Collection // <.> - @Getter @Setter - private SortedSet<ChildObject> children = new TreeSet<ChildObject>(); // <.> - + @Collection // <.> + private Set<ChildObject> children = new TreeSet<ChildObject>(); // <.> } ---- +<.> surrogate identifier for the entity. <.> indicates a bidirectional association; the foreign key pointing back to the `Parent` will be in the table for `ChildObject` -<.> disables cascade delete +<.> enables cascade delete <.> (not actually required in this case, because no attributes are set, but acts as a useful reminder that this collection will be rendered in the UI by Apache Causeway) -<.> uses a `SortedSet` (as opposed to some other collection type; discussion below) while in the child object you will have: [source,java] ---- -import javax.jdo.annotations.Column; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; import lombok.Getter; import lombok.Setter; +@Entity public class ChildObject - implements Comparable<ChildObject> { // <.> + implements Comparable<ChildObject> { + + @Id // <.> + @GeneratedValue(strategy = GenerationType.AUTO) + @Column(name = "id", nullable = false) + private Long id; - @Column(allowsNull = "false") // <.> - @Property(editing = Editing.DISABLED) // <.> + @ManyToOne(optional = false) // <.> + @JoinColumn(name = "parent_id") + @Property(editing = Editing.DISABLED) // <.> @Getter @Setter - private ParentObject parent; + private PetOwner petOwner; } ---- -<.> implements `Comparable` because is mapped using a `SortedSet` +<.> surrogate identifier for the entity. <.> mandatory; every child must reference its parent <.> cannot be edited directly Generally speaking you should use `Set` for collection types (as opposed to `List` or `Collection`). - +You should also implement `equals()` and `hashCode()`, based upon the id. +It's also common to implement `Comparable`, using the same ordering as the unique business key defined within the database and consistent with `equals()`. == Maps @@ -107,7 +120,7 @@ If you do wish to use this collection type, then annotate the getter with xref:r == Value vs Reference Types -While ORMs support collections/arrays of value types, such collections are not supported by Apache Causeway. +While ORMs can persist collections/arrays of value types, such collections are not supported by Apache Causeway. Apache Causeway can (currently) only provide a UI for collections of references. If you do wish to use collections of this type, then annotate the getter with xref:refguide:applib:index/annotation/Programmatic.adoc[@Programmatic] so that it is ignored by the Apache Causeway framework. diff --git a/antora/components/userguide/modules/ROOT/partials/properties-collections-actions/properties.adoc b/antora/components/userguide/modules/ROOT/partials/properties-collections-actions/properties.adoc index c4ddcc0eb8e..50562a05401 100644 --- a/antora/components/userguide/modules/ROOT/partials/properties-collections-actions/properties.adoc +++ b/antora/components/userguide/modules/ROOT/partials/properties-collections-actions/properties.adoc @@ -93,11 +93,11 @@ For example, you can write: [source,java] ---- -import javax.jdo.annotations.Column; +import jakarta.persistence.Column; import lombok.Getter; import lombok.Setter; -@Column(allowsNull="true") +@Column(nullable=true) @Property @Getter @Setter private LocalDate date; @@ -107,11 +107,11 @@ rather than the more verbose: [source,java] ---- -import javax.jdo.annotations.Column; +import jakarta.persistence.Column; import lombok.Getter; import lombok.Setter; -@Column(allowsNull="true") +@Column(nullable=true) @Property(optionality=Optionality.OPTIONAL) @Getter @Setter private LocalDate date; diff --git a/antora/components/userguide/modules/ROOT/partials/the-theory/metamodel.adoc b/antora/components/userguide/modules/ROOT/partials/the-theory/metamodel.adoc index bd503881cec..634283fe7da 100644 --- a/antora/components/userguide/modules/ROOT/partials/the-theory/metamodel.adoc +++ b/antora/components/userguide/modules/ROOT/partials/the-theory/metamodel.adoc @@ -19,7 +19,7 @@ However the framework also recognizes certain other JEE annotations such as `@ja The framework integrates an ORM for persistence, specifically DataNucleus and the JDO API and since version 2.0.0, JPA (Eclipselink) is supported as well. Both JDO and JPA can map to both relational databases and also to various NoSQL objectstores such as MongoDB or Neo4J. -Apache Causeway recognizes a number of these persistence-specific annotations, for example `@javax.jdo.annotations.Column(allowsNull=...)`. +Apache Causeway recognizes a number of these persistence-specific annotations, for example `@jakarta.persistence.Column(nullable=...)`. In addition, the framework builds up the metamodel for each domain object using xref:userguide:ROOT:ui-layout-and-hints.adoc#object-layout[layout hints], such as `Customer.layout.xml`. These provide metadata such as grouping elements of the UI together, using multi-column layouts, and so on. diff --git a/api/applib/src/main/java/org/apache/causeway/applib/annotation/Optionality.java b/api/applib/src/main/java/org/apache/causeway/applib/annotation/Optionality.java index 4841a5732d8..8e5669420d9 100644 --- a/api/applib/src/main/java/org/apache/causeway/applib/annotation/Optionality.java +++ b/api/applib/src/main/java/org/apache/causeway/applib/annotation/Optionality.java @@ -30,8 +30,8 @@ public enum Optionality { * Default, usually meaning mandatory for properties and always meaning mandatory for parameters. * * <p> - * For properties, will be false unless JDO <code>javax.jdo.annotations.Column</code> has also specified with - * <code>javax.jdo.annotations.Column#allowsNull()</code> set to <code>true</code>. + * For properties, will be false unless JPA {@link Column} has also specified with + * {@link Column#nullable()} set to <code>true</code>. * </p> */ DEFAULT, diff --git a/extensions/core/excel/fixture/src/main/java/org/apache/causeway/extensions/excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java b/extensions/core/excel/fixture/src/main/java/org/apache/causeway/extensions/excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java index b1f55978a1c..1447911aab3 100644 --- a/extensions/core/excel/fixture/src/main/java/org/apache/causeway/extensions/excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java +++ b/extensions/core/excel/fixture/src/main/java/org/apache/causeway/extensions/excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java @@ -167,9 +167,6 @@ public class ExcelDemoToDoItem implements Comparable<ExcelDemoToDoItem> /*, Cale @Getter @Setter private String description; - //FIXME - //@javax.jdo.annotations.Persistent(defaultFetchGroup="true") - //@javax.jdo.annotations.Column(allowsNull="true") @Getter @Setter private LocalDate dueBy; @@ -190,15 +187,11 @@ public class ExcelDemoToDoItem implements Comparable<ExcelDemoToDoItem> /*, Cale private boolean complete; @Column(nullable=true, scale=2) - //XXX breaks build, as of JDOQueryProcessor generated source, that cannot be compiled - //@jakarta.validation.constraints.Digits(integer=10, fraction=2) @Property(editing = Editing.DISABLED, editingDisabledReason = "Update using action") @Getter @Setter private BigDecimal cost; @Column(nullable=true, scale=2) - //XXX breaks build, as of JDOQueryProcessor generated source, that cannot be compiled - //@jakarta.validation.constraints.Digits(integer=10, fraction=2) @Property( editing = Editing.DISABLED, editingDisabledReason = "Update using action" @@ -209,20 +202,12 @@ public class ExcelDemoToDoItem implements Comparable<ExcelDemoToDoItem> /*, Cale @Getter @Setter @Column(nullable=true, length=400) @Property(editing = Editing.ENABLED) - // @SummernoteEditor(height = 100, maxHeight = 300) private String notes; @Getter @Setter - //FIXME - //@javax.jdo.annotations.Persistent(defaultFetchGroup="false") - //@javax.jdo.annotations.Column(allowsNull="true", jdbcType="BLOB", sqlType="LONGBINARY") private Blob attachment; @Getter @Setter - //FIXME -// @javax.jdo.annotations.Persistent(table="ExcelDemoToDoItemDependencies") -// @javax.jdo.annotations.Join(column="dependingId") -// @javax.jdo.annotations.Element(column="dependentId") @CollectionLayout(sortedBy = DependenciesComparator.class) private SortedSet<ExcelDemoToDoItem> dependencies = new TreeSet<>(); diff --git a/valuetypes/asciidoc/adoc/modules/asciidoc/pages/about.adoc b/valuetypes/asciidoc/adoc/modules/asciidoc/pages/about.adoc index c26f5ddd866..6f42bf2e3ad 100644 --- a/valuetypes/asciidoc/adoc/modules/asciidoc/pages/about.adoc +++ b/valuetypes/asciidoc/adoc/modules/asciidoc/pages/about.adoc @@ -124,18 +124,6 @@ private AsciiDoc helpText; ---- <.> maps to a (c)lob -* if declared in an xref:pjdo::[JDO] entity: -+ -[source,java] ----- -@Property -@PropertyLayout -@Column(allowsNull = "false", jdbcType = "CLOB") // <.> -@Getter @Setter -private AsciiDoc helpText; ----- -<.> maps to a CLOB - * if declared in a JAXB view model: + [source,java] diff --git a/valuetypes/markdown/adoc/modules/markdown/pages/about.adoc b/valuetypes/markdown/adoc/modules/markdown/pages/about.adoc index 687d1dc218a..7cd99e8fc7d 100644 --- a/valuetypes/markdown/adoc/modules/markdown/pages/about.adoc +++ b/valuetypes/markdown/adoc/modules/markdown/pages/about.adoc @@ -99,7 +99,7 @@ And in your application's xref:userguide::modules.adoc#appmanifest[App Manifest] @Import({ CausewayModuleValMarkdownUiWkt.class, CausewayModuleValMarkdownMetaModel.class, - + ... }) public class AppManifest { @@ -125,18 +125,6 @@ private Markdown helpText; ---- <.> maps to a (c)lob -* if declared in an xref:pjdo::[JDO] entity: -+ -[source,java] ----- -@Property -@PropertyLayout -@Column(allowsNull = "false", jdbcType = "CLOB") // <.> -@Getter @Setter -private Markdown helpText; ----- -<.> maps to a CLOB - * if declared in a JAXB view model: + [source,java] diff --git a/valuetypes/vega/adoc/modules/vega/pages/about.adoc b/valuetypes/vega/adoc/modules/vega/pages/about.adoc index 1c9719b505e..4740ed36a91 100644 --- a/valuetypes/vega/adoc/modules/vega/pages/about.adoc +++ b/valuetypes/vega/adoc/modules/vega/pages/about.adoc @@ -125,18 +125,6 @@ private Vega helpText; ---- <.> maps to a (c)lob -* if declared in an xref:pjdo::[JDO] entity: -+ -[source,java] ----- -@Property -@PropertyLayout -@Column(allowsNull = "false", jdbcType = "CLOB") // <.> -@Getter @Setter -private Vega helpText; ----- -<.> maps to a CLOB - * if declared in a JAXB view model: + [source,java]
