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 2c403d5f71bdfdfbe4fa3122e1b20971ef1db25e Author: Dan Haywood <[email protected]> AuthorDate: Fri Oct 17 12:19:09 2025 +0100 CAUSEWAY-3866: removes more jdo references --- .../ROOT/partials/module-nav/components.adoc | 2 - .../modules/intellij/attachments/.gitignore | 1 - .../causeway-settings-file-templates.jar | Bin 10702 -> 0 bytes .../setupguide/modules/intellij/pages/about.adoc | 64 +------------------- .../modules/intellij/partials/coding-standards.txt | 12 ---- .../intellij/partials/faster-turnaround-times.txt | 67 +-------------------- .../modules/intellij/partials/file-templates.txt | 40 ------------ .../modules/intellij/partials/live-templates.txt | 22 ------- .../userguide/modules/ROOT/pages/value-types.adoc | 32 ++-------- antora/playbooks/site.NEXT.yml | 2 +- .../adoc/modules/runtimeservices/pages/about.adoc | 2 +- .../adoc/modules/commandlog/pages/about.adoc | 17 ++---- .../adoc/modules/executionlog/pages/about.adoc | 17 ++---- .../adoc/modules/executionoutbox/pages/about.adoc | 18 ++---- .../adoc/modules/audittrail/pages/about.adoc | 13 +--- .../adoc/modules/secman/pages/setting-up.adoc | 18 ++---- .../adoc/modules/sessionlog/pages/about.adoc | 13 +--- .../adoc/modules/ROOT/pages/hints-and-tips.adoc | 1 - .../jpa/adoc/modules/ROOT/partials/module-nav.adoc | 2 +- .../querydsl/adoc/modules/ROOT/pages/about.adoc | 5 +- .../ROOT/pages/setup-and-configuration.adoc | 11 ---- security/adoc/modules/ROOT/pages/about.adoc | 2 +- .../adoc/modules/archtestsupport/pages/about.adoc | 22 +------ .../adoc/modules/asciidoc/pages/about.adoc | 10 ++- .../adoc/modules/markdown/pages/about.adoc | 11 ++-- valuetypes/vega/adoc/modules/vega/pages/about.adoc | 10 ++- 26 files changed, 53 insertions(+), 361 deletions(-) diff --git a/antora/components/docs/modules/ROOT/partials/module-nav/components.adoc b/antora/components/docs/modules/ROOT/partials/module-nav/components.adoc index 4e75c1f7d06..0dc6dbdd128 100644 --- a/antora/components/docs/modules/ROOT/partials/module-nav/components.adoc +++ b/antora/components/docs/modules/ROOT/partials/module-nav/components.adoc @@ -7,7 +7,6 @@ *** xref:security:bypass:about.adoc[Bypass] *** xref:security:simple:about.adoc[Simple] -*** xref:security:shiro:about.adoc[Shiro] *** xref:security:spring:about.adoc[Spring] *** xref:security:keycloak:about.adoc[Keycloak] @@ -20,5 +19,4 @@ ** Persistence *** xref:pjpa:ROOT:about.adoc[] -*** xref:pjdo:ROOT:about.adoc[] diff --git a/antora/components/setupguide/modules/intellij/attachments/.gitignore b/antora/components/setupguide/modules/intellij/attachments/.gitignore deleted file mode 100644 index 1a8fd13e007..00000000000 --- a/antora/components/setupguide/modules/intellij/attachments/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!causeway-settings-file-templates.jar diff --git a/antora/components/setupguide/modules/intellij/attachments/causeway-settings-file-templates.jar b/antora/components/setupguide/modules/intellij/attachments/causeway-settings-file-templates.jar deleted file mode 100644 index c64ef96a17b..00000000000 Binary files a/antora/components/setupguide/modules/intellij/attachments/causeway-settings-file-templates.jar and /dev/null differ diff --git a/antora/components/setupguide/modules/intellij/pages/about.adoc b/antora/components/setupguide/modules/intellij/pages/about.adoc index 2beb8d211ec..9769ca9558a 100644 --- a/antora/components/setupguide/modules/intellij/pages/about.adoc +++ b/antora/components/setupguide/modules/intellij/pages/about.adoc @@ -45,10 +45,6 @@ image::015-import-project/040-project-structure.png[width="800px"] == Configuring -//include::partial$UNUSED/file-templates.adoc[leveloffset=+2] -//include::partial$UNUSED/live-templates.adoc[leveloffset=+2] -//include::partial$UNUSED/coding-standards.adoc[leveloffset=+2] - === Compiler Settings There are a number of compiler settings that influence the compiler. @@ -124,8 +120,7 @@ The screenshot below shows a run configuration for JPA: image::110-running-the-app/012-run-configuration-jpa.png[width=1000] - -With JPA, the classes need to be "weaved" in order to support lazy loading and (more performant) dirty object tracking. +With xref:pjpa:ROOT:about.adoc[JPA/Eclipselink], the classes can optionally be "weaved" in order to support lazy loading and (more performant) dirty object tracking. This is typically done dynamically at runtime, using a Java agent. The xref:docs:starters:simpleapp.adoc[SimpleApp] and xref:docs:starters:helloworld.adoc[HelloWorld] starter apps demonstrate this, bundling the `spring-instrument.jar` file. To run, use: @@ -138,54 +133,6 @@ To run, use: as a JVM argument (where the system properties also are located.) -=== Running the App (JDO) - -DataNucleus requires that all entities are bytecode enhanced. -When building from the command line using Maven, the `datanucleus:enhance` Maven plugin takes care of this. - -We can just have IntelliJ run the enhance as a separate run configuration before the run configuration that runs the app itself. - -First, set up the run configuration to do the enhance: - -.Run Configuration to enhance the entities -image::110-running-the-app/005-datanucleus-enhance-run-configuration.png[width="700px"] - -TIP: Check "work offline" (in Maven Options) to speed this up slightly. - -[WARNING] -==== -If on Windows you encounter "The command line is too long", then set '-Dfork=false' as a VM option, in Java options: - -image::110-running-the-app/006-datanucleus-enhance-run-configuration-fork-false.png[width="400px"] -==== - -Then, set up the run configuration for the app: - -.Run Configuration to run the app -image::110-running-the-app/010-run-configuration.png[width="700px"] - -Note how it runs the "enhance" configuration first, specified using "Modify options". - -Because we are using Maven to enhance the app, build the app at least once from the Maven command line: - -[source,bash] ----- -mvn install -DskipTests -T1C ----- - -You should now be able to run the app using `Run > Run Configuration`. -The same configuration can also be used to debug the app if you so need. - - -.Dynamic Enhancement ? -[sidebar] -**** -Rather than statically enhancing the classes, an alternative -- at least in theory -- is to enhance the classes dynamically, at runtime. - -There is an link:https://plugins.jetbrains.com/plugin/11119-datanucleus-runtime-enhancement[IntelliJ plugin] (not tested) that purports to support this, but (at time of writing) is out of date and only supports older versions of IntelliJ. -**** - - === Running the Unit Tests The easiest way to run the unit tests is just to right click on the relevant package in the _Project Window_, and choose run unit tests. @@ -209,13 +156,4 @@ There are also tests in the `webapp-tests` module: image::110-running-the-app/046-running-integ-tests-webapp-tests.png[width=800] -If the app uses JDO, then the tests might fail because the entities won't have been enhanced. -However, we can then easily update the automatically-created run configuration to run the datanucleus enhancer goal (same as when running the application): - -.Integration Tests Run Configuration -image::110-running-the-app/050-running-integration-tests-run-configuration.png[width="700px"] - -// CAUTION: Make sure that the `search for tests` radio button is set to `In single module`. -// If this radio button is set to one of the other options then you may obtain class loading issues. - diff --git a/antora/components/setupguide/modules/intellij/partials/coding-standards.txt b/antora/components/setupguide/modules/intellij/partials/coding-standards.txt deleted file mode 100644 index 30f870016aa..00000000000 --- a/antora/components/setupguide/modules/intellij/partials/coding-standards.txt +++ /dev/null @@ -1,12 +0,0 @@ -= Coding Standards - -: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 [...] - -// LATER - -CAUTION: seem to have mislaid this file... would need verifying/updating anyway, I think. - -Next, we suggest you import settings for standard ASF/Apache Causeway coding conventions. -This file is also provided as a settings file, namely *link:{attachmentsdir}/intellij/causeway-settings-code-style.jar[causeway-settings-code-style.jar]*. -Download and import (as for the above settings JAR files). - diff --git a/antora/components/setupguide/modules/intellij/partials/faster-turnaround-times.txt b/antora/components/setupguide/modules/intellij/partials/faster-turnaround-times.txt index 48c9827e82c..4f8ca1ab743 100644 --- a/antora/components/setupguide/modules/intellij/partials/faster-turnaround-times.txt +++ b/antora/components/setupguide/modules/intellij/partials/faster-turnaround-times.txt @@ -9,71 +9,10 @@ This section describes how to install and setup JetBrains' IntelliJ IDEA, then h In this section are several options that will reduce the time it takes between making a source code edit and seeing the results in the running app. code/build/deploy/review feedback loop. -== Using Grade to compile/enhance - -Running an Apache Causeway application requires that the DataNucleus enhancer runs on the compiled bytecode. -As described xref:setupguide:intellij:about.adoc#running-the-app[above], the recommended way to do this with IntelliJ is to use a Run configuration that runs the enhancer goal prior to launch. - -Alternative, you can use the following `build.gradle` script in your `dom` module: - -[source,groovy] -.`build.gradle` ----- -apply plugin: 'java' -apply plugin: 'tangram.tools' -sourceCompatibility = 1.8 -targetCompatibility = 1.8 -version = (new XmlParser()).parse('pom.xml').parent.version.text() -buildscript { - repositories { - maven { url "http://oss.jfrog.org/artifactory/oss-snapshot-local" } - jcenter() - } - dependencies { - classpath 'tangram:gradle-plugin:1.1.2' - } -} -repositories { - mavenLocal() - maven { url "http://oss.jfrog.org/artifactory/oss-snapshot-local" } - jcenter() -} -dependencies { - compile group: 'org.apache.causeway.core', name: 'causeway-core-applib', version: version -} -task copyClasses << { - copy { - from 'build/classes/main' - into 'target/classes' - } -} ----- - -The script is intended to be in the background as a daemon while editing/developing; whenever a change is made to any source code, gradle will automatically compile _and_ enhance the code. -In this way it eliminates the need to start up Maven and run the enhancer goal. - -To use, you must disable the IntelliJ's automatic building of the 'dom' project. -This is done using: -`File > Settings > Build, Execution, Deployment > Compiler > Excludes`, and then exclude the `.../dom/src/main/java` -directory: - -image::070-advanced/002-compiler-exclude.png[width="800px"] - - -The script can be run in the background using: - -[source,bash] ----- -gradle -t --offline & ----- - -from the command line (in the `dom` module). - -image::070-advanced/004-gradle-output.png[width="600px"] == Using Gradle for liveReload -Similarly, gradle can be run to reduce the turn-around time when tweaking the UI (defined by the +Gradle can be run to reduce the turn-around time when tweaking the UI (defined by the xref:userguide:ROOT:ui-layout-and-hints.adoc#object-layout[*.layout.xml] file for each domain class), when the app is running. The framework will automatically notice any changes to `.layout.xml` files, but these are read from the classpath (the `target/classes` directory), not the source path. @@ -157,8 +96,8 @@ link:http://github.com/dcevm/dcevm[DCEVM] enhances the JVM with true hot-swap ad 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, for two reasons: the JDO/DataNucleus enhancer needs to run on domain entities, and also at runtime JDO/DataNucleus 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. +Changing persisting domain entities is more problematic, because the ORM needs to rebuild its own metamodel. +You may find that adding actions will work, but adding new properties or collections are less likely to. To set up DCEVM, download the appropriate JAR from the link:https://dcevm.github.io/[github page], and run the installer. For example: diff --git a/antora/components/setupguide/modules/intellij/partials/file-templates.txt b/antora/components/setupguide/modules/intellij/partials/file-templates.txt deleted file mode 100644 index f4b68d23d2b..00000000000 --- a/antora/components/setupguide/modules/intellij/partials/file-templates.txt +++ /dev/null @@ -1,40 +0,0 @@ -= File Templates - -: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 [...] -:page-partial: - - -// LATER - -Next we recommend you import a set of standard file templates. -These are used to create new classes or supporting files: - -.File templates -image::030-import-settings/040-file-templates.png[width="400px"] - -The file templates are provided as a settings JAR file, namely *link:{attachmentsdir}/causeway-settings-file-templates.jar[causeway-settings-file-templates.jar]*. -Download this file. - -Next, import using `File > Import Settings`, specifying the directory that you have downloaded the file to: - -.IntelliJ Import Settings - Specify JAR file -image::030-import-settings/010-settings-import-jar.png[width="400px"] - -Select all the categories (there should just be one), and hit OK. then hit restart. - -[WARNING] -==== -If importing into IntelliJ 2017.2.3 two categories are shown - "File templates" and "File templates (schemes)". -Select all the categories. - -Apparently no categories are shown if importing into IntelliJ 2016.1.1 Community Edition (and perhaps other 2016 versions). -The file does import ok into IntelliJ 15.0.x, so we think this is a bug in the 2016 version. - -The workaround is to extract the `.jar` file locally and copy the files into IntelliJ's `config` directory, somewhere in your home directory: - -* Windows `<User home>\.IdeaIC2016\config` -* Linux `~/..IdeaIC2016/config` -* Mac OS `~/Library/Preferences/IdeaIC2016` - -==== - diff --git a/antora/components/setupguide/modules/intellij/partials/live-templates.txt b/antora/components/setupguide/modules/intellij/partials/live-templates.txt deleted file mode 100644 index 2bd91d151fb..00000000000 --- a/antora/components/setupguide/modules/intellij/partials/live-templates.txt +++ /dev/null @@ -1,22 +0,0 @@ -= Live Templates - -: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 [...] - - -// LATER - -We also recommend you import a set of live templates. -These are used to add new methods to existing classes: - -.Live templates -image::030-import-settings/050-live-templates.png[width="600px"] - -The live templates have a prefix of either: - -* `is` : for Apache Causeway domain objects -* `ju` : for JUnit tests -* `jm` : for JMock mocks or libraries - -The live templates are also provided as a settings JAR file, namely *link:{attachmentsdir}/resources/intellij/causeway-settings-live-templates.jar[causeway-settings-live-templates.jar]*. -Download and import (as for the previous settings JAR files). - diff --git a/antora/components/userguide/modules/ROOT/pages/value-types.adoc b/antora/components/userguide/modules/ROOT/pages/value-types.adoc index 0f617d17ddf..aea3302f2cd 100644 --- a/antora/components/userguide/modules/ROOT/pages/value-types.adoc +++ b/antora/components/userguide/modules/ROOT/pages/value-types.adoc @@ -375,10 +375,11 @@ The string returned must be URL safe. As we can see, this is not the simplest of APIs, but the simplification it brings to your entities and view models that can now _consume_ your new value type means that it may be worth the effort. We're not quite finished with the glue code, unfortunately. -Chances are that you will want to persist the new value to the database, which means that the ORM also requires its own SPI to be implemented (but they are almost identical). +Chances are that you will want to persist the new value to the database, which means that the object store also requires its own SPI to be implemented. + +For the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] object store, implement the `javax.persistence.AttributeConverter` SPI. +For example: -* if using xref:pjpa::about.adoc[JPA], then implement the `javax.persistence.AttributeConverter` SPI: -+ [source,java] .EmailAddressConverter.java ---- @@ -401,29 +402,6 @@ public class EmailAddressConverter implements AttributeConverter<EmailAddress, S } ---- -* if using xref:pjdo::about.adoc[JDO], then implement the `org.datanucleus.store.types.converters.TypeConverter` SPI: -+ -[source,java] ----- -public class EmailAddressConverter implements TypeConverter<EmailAddress, String>{ - - private static final long serialVersionUID = 1L; - - @Override - public String toDatastoreType(final EmailAddress memberValue) { - return memberValue != null - ? memberValue.getEmailAddress() - : null; - } - - @Override - public EmailAddress toMemberType(final String datastoreValue) { - return datastoreValue != null - ? EmailAddress.of(datastoreValue) - : null; - } -} ----- === Composite value types @@ -597,7 +575,7 @@ Also, it is not possible to use a custom value type as part of the object's id, If using within the database then you will also need to map the custom type to the database. -If mapping to xref:pjpa::about.adoc[JPA/EclipseLink], use `@Embedded` and `@Embeddable`; see for example link:https://www.baeldung.com/jpa-embedded-embeddable[this baeldung post] on the topic. +If using the xref:pjpa::about.adoc[JPA/EclipseLink] object store, use `@Embedded` and `@Embeddable`; see for example link:https://www.baeldung.com/jpa-embedded-embeddable[this baeldung post] on the topic. diff --git a/antora/playbooks/site.NEXT.yml b/antora/playbooks/site.NEXT.yml index 6f1f23dbed0..dd7d537cd82 100644 --- a/antora/playbooks/site.NEXT.yml +++ b/antora/playbooks/site.NEXT.yml @@ -187,7 +187,7 @@ content: start_path: persistence/jdo/adoc # pjdo branches: [2.0.0, 2.1.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0] - url: . - start_path: persistence/querydsl/adoc # pjdo + start_path: persistence/querydsl/adoc branches: [3.2.0, 3.3.0, 3.4.0, 3.5.0] # regression tests diff --git a/core/runtimeservices/src/main/adoc/modules/runtimeservices/pages/about.adoc b/core/runtimeservices/src/main/adoc/modules/runtimeservices/pages/about.adoc index cc06376049a..2f0d2d8965c 100644 --- a/core/runtimeservices/src/main/adoc/modules/runtimeservices/pages/about.adoc +++ b/core/runtimeservices/src/main/adoc/modules/runtimeservices/pages/about.adoc @@ -9,4 +9,4 @@ Many of the services defined (as interfaces) in the applib are actually implemen Although it's a simplification, you can think of the xref:core:metamodel:about.adoc[] module as handling domain types (cf `java.lang.Class`), while the xref:core:runtime:about.adoc[], xref:core:runtimeservices:about.adoc[] and xref:transaction:about.adoc[] modules handle domain object instances (cf `java.lang.Object`). -That said, Spring Boot is responsible for instantiating domain service instances, while the persistence mechanisms (xref:pjpa:ROOT:about.adoc[JPA] and xref:pjdo:ROOT:about.adoc[JDO]) -- which are not part of the `core` modules -- handle the lifecycle of entity instances. +That said, Spring Boot is responsible for instantiating domain service instances, while the xref:pjpa:ROOT:about.adoc[JPA] object store -- which is not part of the `core` modules -- handle the lifecycle of entity instances. diff --git a/extensions/core/commandlog/adoc/modules/commandlog/pages/about.adoc b/extensions/core/commandlog/adoc/modules/commandlog/pages/about.adoc index 3e49f2b538b..cb4ccd87e90 100644 --- a/extensions/core/commandlog/adoc/modules/commandlog/pages/about.adoc +++ b/extensions/core/commandlog/adoc/modules/commandlog/pages/about.adoc @@ -41,7 +41,7 @@ Add an entry for the _Command Log_ module's own BOM: [#dependencies] === Dependencies / Imports -In the webapp module of your application, add the following dependency: +In the webapp module of your application, add the following dependency for the xref:pjpa::about.adoc[] object store: [source,xml] .pom.xml @@ -49,33 +49,26 @@ In the webapp module of your application, add the following dependency: <dependencies> <dependency> <groupId>org.apache.causeway.extensions</groupId> - <artifactId>causeway-extensions-commandlog-persistence-XXX</artifactId> <!--.--> + <artifactId>causeway-extensions-commandlog-persistence-jpa</artifactId> </dependency> </dependencies> ---- -<.> either: -** `causeway-extensions-commandlog-persistence-jpa` (xref:pjpa::about.adoc[]), or -** `causeway-extensions-commandlog-persistence-jdo` (xref:pjdo::about.adoc[]). In your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the CommandLog modules. -The exact modules to use will depend upon the persistence mechanism in use: +For the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism, use: [source,java] .AppManifest.java ---- @Configuration @Import({ - ... - CausewayModuleExtCommandLogPersistenceXxx.class, // <.> - ... + CausewayModuleExtCommandLogPersistenceJpa.class, + // ... }) public class AppManifest { } ---- -<.> either -** `CausewayModuleExtCommandLogPersistenceJpa` (xref:pjpa::about.adoc[]),or -** `CausewayModuleExtCommandLogPersistenceJdo`, (xref:pjdo::about.adoc[]) If using xref:security:secman:about.adoc[], you will also need to import the xref:testing:fixtures:about.adoc[Fixture] module; SecMan uses fixture scripts to seed its entities. diff --git a/extensions/core/executionlog/adoc/modules/executionlog/pages/about.adoc b/extensions/core/executionlog/adoc/modules/executionlog/pages/about.adoc index f1ca9c504a5..0ca0a8e387f 100644 --- a/extensions/core/executionlog/adoc/modules/executionlog/pages/about.adoc +++ b/extensions/core/executionlog/adoc/modules/executionlog/pages/about.adoc @@ -39,7 +39,7 @@ Add an entry for the _Execution Log_ module's own BOM: [#dependencies] === Dependencies / Imports -In the webapp module of your application, add the following dependency: +In the webapp module of your application, add the following dependency for the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] object store: [source,xml] .pom.xml @@ -47,32 +47,25 @@ In the webapp module of your application, add the following dependency: <dependencies> <dependency> <groupId>org.apache.causeway.extensions</groupId> - <artifactId>causeway-extensions-executionlog-persistence-XXX</artifactId> <!--.--> + <artifactId>causeway-extensions-executionlog-persistence-jpa</artifactId> </dependency> </dependencies> ---- -<.> either: -** `causeway-extensions-executionlog-persistence-jpa` (xref:pjpa::about.adoc[]), or -** `causeway-extensions-executionlog-persistence-jdo` (xref:pjdo::about.adoc[]) In your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the _ExecutionLog_ modules. -The exact modules to use will depend upon the persistence mechanism in use: +For the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism, use: [source,java] .AppManifest.java ---- @Configuration @Import({ - ... - CausewayModuleExtExecutionLogPersistenceXxx.class, // <.> - ... + CausewayModuleExtExecutionLogPersistenceJpa.class, + // ... }) public class AppManifest { } ---- -<.> either: -** `CausewayModuleExtExecutionLogPersistenceJdo` (xref:pjpa::about.adoc[]), or -** `CausewayModuleExtExecutionLogPersistenceJpa` (xref:pjdo::about.adoc[]) If using xref:security:secman:about.adoc[], you will also need to import the xref:testing:fixtures:about.adoc[Fixture] module; SecMan uses fixture scripts to seed its entities. diff --git a/extensions/core/executionoutbox/adoc/modules/executionoutbox/pages/about.adoc b/extensions/core/executionoutbox/adoc/modules/executionoutbox/pages/about.adoc index fb23c8b28a9..300d4b2902f 100644 --- a/extensions/core/executionoutbox/adoc/modules/executionoutbox/pages/about.adoc +++ b/extensions/core/executionoutbox/adoc/modules/executionoutbox/pages/about.adoc @@ -37,7 +37,7 @@ Add a section for _Execution Outbox_'s own BOM: [#dependencies] === Dependencies / Imports -In the webapp module of your application, add the following dependency: +In the webapp module of your application, add the following dependency for the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism: [source,xml] .pom.xml @@ -45,34 +45,26 @@ In the webapp module of your application, add the following dependency: <dependencies> <dependency> <groupId>org.apache.causeway.extensions</groupId> - <artifactId>causeway-extensions-executionoutbox-persistence-XXX</artifactId> <!--.--> + <artifactId>causeway-extensions-executionoutbox-persistence-jpa</artifactId> </dependency> </dependencies> ---- -<.> either: -** `causeway-extensions-executionoutbox-persistence-jpa` (xref:pjpa::about.adoc[]), or -** `causeway-extensions-executionoutbox-persistence-jdo` (xref:pjdo::about.adoc[]) In your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the _ExecutionOutbox_ modules. -The exact modules to use will depend upon the persistence mechanism in use: - +For the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism, use: [source,java] .AppManifest.java ---- @Configuration @Import({ - ... - CausewayModuleExtExecutionOutboxPersistenceXxx.class, // <.> - ... + CausewayModuleExtExecutionOutboxPersistenceJpa.class, + // ... }) public class AppManifest { } ---- -<.> either: -** `CausewayModuleExtExecutionOutboxPersistenceJdo` (xref:pjpa::about.adoc[]), or -** `CausewayModuleExtExecutionOutboxPersistenceJpa` (xref:pjdo::about.adoc[]) If using xref:security:secman:about.adoc[], you will also need to import the xref:testing:fixtures:about.adoc[Fixture] module; SecMan uses fixture scripts to seed its entities. diff --git a/extensions/security/audittrail/adoc/modules/audittrail/pages/about.adoc b/extensions/security/audittrail/adoc/modules/audittrail/pages/about.adoc index 33bd122d857..1c812431da9 100644 --- a/extensions/security/audittrail/adoc/modules/audittrail/pages/about.adoc +++ b/extensions/security/audittrail/adoc/modules/audittrail/pages/about.adoc @@ -64,7 +64,7 @@ public class MyModule { ... } ---- In your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the implementation modules of this extension. -The exact modules to use will depend upon the persistence mechanism in use: +For the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism: * add this dependency to your webapp's `pom.xml`: + @@ -74,13 +74,10 @@ The exact modules to use will depend upon the persistence mechanism in use: <dependencies> <dependency> <groupId>org.apache.causeway.extensions</groupId> - <artifactId>causeway-extensions-audittrail-persistence-xxx</artifactId> <!--.--> + <artifactId>causeway-extensions-audittrail-persistence-jpa</artifactId> </dependency> </dependencies> ---- -<.> either: -** `causeway-extensions-audittrail-persistence-jpa` (xref:pjpa::about.adoc[]) or -** `causeway-extensions-audittrail-persistence-jdo` (xref:pjdo::about.adoc[]) * and `@Import` this module to your app manifest: + @@ -89,15 +86,11 @@ The exact modules to use will depend upon the persistence mechanism in use: ---- @Configuration @Import({ - CausewayModuleExtAuditTrailPersistenceXxx.class, // <.> + CausewayModuleExtAuditTrailPersistenceJpa.class, // ... }) public class MyAppManifest { ... } ---- -<.> either -+ -** `CausewayModuleExtAuditTrailPersistenceJpa` (xref:pjpa::about.adoc[]) or -** `CausewayModuleExtAuditTrailPersistenceJdo` (xref:pjdo::about.adoc[]) [#menubar-layout-xml] diff --git a/extensions/security/secman/adoc/modules/secman/pages/setting-up.adoc b/extensions/security/secman/adoc/modules/secman/pages/setting-up.adoc index 361076252b3..243a0280c70 100644 --- a/extensions/security/secman/adoc/modules/secman/pages/setting-up.adoc +++ b/extensions/security/secman/adoc/modules/secman/pages/setting-up.adoc @@ -35,7 +35,7 @@ In addition, add an entry for _SecMan_'s own BOM: == Dependencies In the webapp module of your application, add the implementation modules of the extension. -The exact modules to use will depend upon the persistence mechanism in use: +For the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism, use: [source,xml] .pom.xml @@ -43,7 +43,7 @@ The exact modules to use will depend upon the persistence mechanism in use: <dependencies> <dependency> <groupId>org.apache.causeway.extensions</groupId> - <artifactId>causeway-extensions-secman-persistence-XXX</artifactId> <!--.--> + <artifactId>causeway-extensions-secman-persistence-jpa</artifactId> </dependency> <dependency> <groupId>org.apache.causeway.extensions</groupId> @@ -51,14 +51,9 @@ The exact modules to use will depend upon the persistence mechanism in use: </dependency> </dependencies> ---- -<.> either: -** `causeway-extensions-secman-persistence-jpa` (xref:pjpa::about.adoc[]) or -** `causeway-extensions-secman-persistence-jdo` (xref:pjdo::about.adoc[]) <.> provides an implementation of `PasswordEncoder`, so that passwords are only persisted in encrypted form. - In your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the corresponding _SecMan_ modules. -Again, the exact modules to use will depend upon the persistence mechanism in use. You will also need to import the fixture module; SecMan uses fixture scripts to seed its entities: [source,java] @@ -66,19 +61,14 @@ You will also need to import the fixture module; SecMan uses fixture scripts to ---- @Configuration @Import({ - ... - CausewayModuleExtSecmanPersistenceXxx.class, // <.> + CausewayModuleExtSecmanPersistenceJpa.class, CausewayModuleExtSecmanEncryptionJbcrypt.class, // <.> - CausewayModuleTestingFixturesApplib.class, // <.> - ... + // ... }) public class AppManifest { } ---- -<.> either -** `CausewayModuleExtSecmanPersistenceJpa` (xref:pjpa::about.adoc[]) or -** `CausewayModuleExtSecmanPersistenceJdo` (xref:pjdo::about.adoc[]) <.> use Jbcrypt to encrypt passwords <.> fixture script support diff --git a/extensions/security/sessionlog/adoc/modules/sessionlog/pages/about.adoc b/extensions/security/sessionlog/adoc/modules/sessionlog/pages/about.adoc index d24e3c4d6b2..7e8ffd5b11f 100644 --- a/extensions/security/sessionlog/adoc/modules/sessionlog/pages/about.adoc +++ b/extensions/security/sessionlog/adoc/modules/sessionlog/pages/about.adoc @@ -61,7 +61,7 @@ public class MyModule { ... } ---- In your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the implementation modules of this extension. -The exact modules to use will depend upon the persistence mechanism in use: +For the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism: * add this dependency to your webapp's `pom.xml`: + @@ -71,13 +71,10 @@ The exact modules to use will depend upon the persistence mechanism in use: <dependencies> <dependency> <groupId>org.apache.causeway.extensions</groupId> - <artifactId>causeway-extensions-sessionlog-persistence-xxx</artifactId> <!--.--> + <artifactId>causeway-extensions-sessionlog-persistence-jpa</artifactId> </dependency> </dependencies> ---- -<.> either: -** `causeway-extensions-sessionlog-persistence-jpa` (xref:pjpa::about.adoc[]) or -** `causeway-extensions-sessionlog-persistence-jdo` (xref:pjdo::about.adoc[]) * and `@Import` this module to your app manifest: + @@ -86,15 +83,11 @@ The exact modules to use will depend upon the persistence mechanism in use: ---- @Configuration @Import({ - CausewayModuleExtSessionLogPersistenceXxx.class, // <.> + CausewayModuleExtSessionLogPersistenceJpa.class, // ... }) public class MyAppManifest { ... } ---- -<.> either -+ -** `CausewayModuleExtSessionLogPersistenceJpa` (xref:pjpa::about.adoc[]) or -** `CausewayModuleExtSessionLogPersistenceJdo` (xref:pjdo::about.adoc[]) diff --git a/persistence/jpa/adoc/modules/ROOT/pages/hints-and-tips.adoc b/persistence/jpa/adoc/modules/ROOT/pages/hints-and-tips.adoc index 39a8d511857..6df9fe388c3 100644 --- a/persistence/jpa/adoc/modules/ROOT/pages/hints-and-tips.adoc +++ b/persistence/jpa/adoc/modules/ROOT/pages/hints-and-tips.adoc @@ -6,4 +6,3 @@ This page provides some solutions for problems we've encountered ourselves or have been raised on the Apache Causeway mailing lists. -include::pjdo:ROOT:partial$hints-and-tips/tracing-sql-statements.adoc[leveloffset=+1] diff --git a/persistence/jpa/adoc/modules/ROOT/partials/module-nav.adoc b/persistence/jpa/adoc/modules/ROOT/partials/module-nav.adoc index ef72866858a..0a13610366b 100644 --- a/persistence/jpa/adoc/modules/ROOT/partials/module-nav.adoc +++ b/persistence/jpa/adoc/modules/ROOT/partials/module-nav.adoc @@ -5,4 +5,4 @@ * xref:pjpa:ROOT:mapping-guide.adoc[Mapping Guide] * xref:pjpa:ROOT:dependency-injection.adoc[Dependency Injection] * xref:pjpa:ROOT:domain-services.adoc[Domain Services] -* xref:pjpa:ROOT:hints-and-tips.adoc[Hints and Tips] +// * xref:pjpa:ROOT:hints-and-tips.adoc[Hints and Tips] diff --git a/persistence/querydsl/adoc/modules/ROOT/pages/about.adoc b/persistence/querydsl/adoc/modules/ROOT/pages/about.adoc index fecb4927932..21a1cbaf1c9 100644 --- a/persistence/querydsl/adoc/modules/ROOT/pages/about.adoc +++ b/persistence/querydsl/adoc/modules/ROOT/pages/about.adoc @@ -3,8 +3,7 @@ :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 [...] -link:http://querydsl.com/[QueryDSL] provides a way to express queries independently of the particular persistence mechanism, abstracting out whether the ORM in use is xref:pjdo:ROOT:about.adoc[JDO] or xref:pjpa:ROOT:about.adoc[JPA]. - +link:http://querydsl.com/[QueryDSL] provides a way to express type-safe queries. Apache Causeway's integration with QueryDSL provides the following capabilities: * xref:refguide:persistence:index/querydsl/applib/services/repo/QueryDslRepository.adoc[] @@ -24,7 +23,7 @@ The query expressions from xref:refguide:persistence:index/querydsl/applib/servi Those from xref:refguide:persistence:index/querydsl/applib/services/support/DetachedQueryFactory.adoc[] are detached; they cannot be submitted directly. Instead, they are intended to be combined with the attached queries, e.g. in subqueries. + -Although xref:refguide:persistence:index/querydsl/applib/services/support/QueryDslSupport.adoc[] itself is abstract, both the xref:pjpa::about.adoc[JPA] and xref:pjdo::about.adoc[JDO] persistence mechanisms provide concrete implementations. +The xref:refguide:persistence:index/querydsl/applib/services/support/QueryDslSupport.adoc[] service is abstract, while the the xref:pjpa::about.adoc[JPA/EclipseLink] persistence mechanism provides the concrete implementations. * xref:refguide:persistence:index/querydsl/applib/services/auto/AutoCompleteGeneratedQueryService.adoc[] + diff --git a/persistence/querydsl/adoc/modules/ROOT/pages/setup-and-configuration.adoc b/persistence/querydsl/adoc/modules/ROOT/pages/setup-and-configuration.adoc index 2a6be706052..a990b749560 100644 --- a/persistence/querydsl/adoc/modules/ROOT/pages/setup-and-configuration.adoc +++ b/persistence/querydsl/adoc/modules/ROOT/pages/setup-and-configuration.adoc @@ -22,17 +22,6 @@ This section describes the required changes to use QueryDSL if using xref:pjpa:: include::partial$setup-and-configuration-for-persistence-mechanism.adoc[] -== JDO - -This section describes the required changes to use QueryDSL if using xref:pjdo::about.adoc[JDO] as your persistence mechanism. - -:querydsl-implementation: jdo -:querydsl-implementation-capitalized: Jdo -:querydsl-annotation-processor: com.querydsl.apt.jdo.JDOAnnotationProcessor - - -include::partial$setup-and-configuration-for-persistence-mechanism.adoc[] - == Configuration Properties diff --git a/security/adoc/modules/ROOT/pages/about.adoc b/security/adoc/modules/ROOT/pages/about.adoc index bc81259d337..417e7328486 100644 --- a/security/adoc/modules/ROOT/pages/about.adoc +++ b/security/adoc/modules/ROOT/pages/about.adoc @@ -34,7 +34,7 @@ include::security:spring:partial$module-nav.adoc[] In addition to the security SPI implementations, there are a number of security-related extensions: * The xref:security:spring-oauth2:about.adoc[Spring OAuth2] extension configures the xref:security:spring:about.adoc[Spring authenticator] for OAuth2 stores (eg gmail, facebook) -* The xref:security:secman:about.adoc[SecMan extension] provides both an authenticator and an authorizor from domain entities (users, roles and permission entities) using either xref:pjpa:ROOT:about.adoc[JPA] or xref:pjdo:ROOT:about.adoc[JDO]. +* The xref:security:secman:about.adoc[SecMan extension] provides both an authenticator and an authorizor from domain entities (users, roles and permission entities) using xref:pjpa:ROOT:about.adoc[JPA/EclipseLink]. + As these users, roles and permissions are domain objects, they can be administered through Apache Causeway itself. diff --git a/testing/archtestsupport/adoc/modules/archtestsupport/pages/about.adoc b/testing/archtestsupport/adoc/modules/archtestsupport/pages/about.adoc index 0956758e16a..7eeb6b84d46 100644 --- a/testing/archtestsupport/adoc/modules/archtestsupport/pages/about.adoc +++ b/testing/archtestsupport/adoc/modules/archtestsupport/pages/about.adoc @@ -176,7 +176,7 @@ None of these rules take any arguments, so simply include (as a static field) th == Entity Checks -Entity rule checks are provided for both xref:pjpa::about.adoc[] and xref:pjdo::about.adoc[], in `ArchitectureJpaRules` and `ArchitectureJdoRules` respectively: +Entity rule checks are provided for xref:pjpa::about.adoc[JPA/EclipseLink] in the `ArchitectureJpaRules` class: * Strongly Recommended @@ -191,7 +191,6 @@ Required in almost all cases: Required to allow JAXB view models to transparently reference entities: *** `every_jpa_Entity_must_be_annotated_with_XmlJavaAdapter_of_PersistentEntityAdapter()` -*** `every_jdo_PersistenceCapable_must_be_annotated_as_XmlJavaAdapter_PersistentEntityAdapter()` ** ensure JPA entity defines a surrogate key: + @@ -199,13 +198,6 @@ Enforces a very common convention for JPA entities: *** `every_jpa_Entity_must_have_an_id_field()` -** ensure JDO entity's logicalTypeName matches its discriminator (if any) -+ -Both the logical type name and the `@Discriminator` for subclasses are a unique identifier of a type; this rule says they should be the same value. - -*** `every_logicalTypeName_and_jdo_discriminator_must_be_same()` - - * Recommended ** encourage entities be organised into schemas: @@ -213,7 +205,6 @@ Both the logical type name and the `@Discriminator` for subclasses are a unique for teams adopting a "(micro) service-oriented" mindset: *** `every_jpa_Entity_must_be_annotated_as_Table_with_schema()` -*** `every_jdo_PersistenceCapable_must_have_schema()` ** ensure JPA enum fields are persisted as strings: @@ -228,14 +219,12 @@ For teams that prefer to query the database with enum values persisted as string For teams that like to use `SortedSet` for parented collections, and rely on the entity to render itself in a "sensible" order: *** `every_jpa_Entity_must_implement_Comparable()` -*** `every_jdo_PersistenceCapable_must_implement_Comparable()` ** ensure entities have a unique business key: + For teams that insist on business keys in addition to surrogate keys *** `every_jpa_Entity_must_be_annotated_as_Table_with_uniqueConstraints()` -*** `every_jdo_PersistenceCapable_must_be_annotated_as_Uniques_or_Unique()` * Optional @@ -244,27 +233,18 @@ For teams that insist on business keys in addition to surrogate keys For teams that like to emphasise entities vs view models: *** `every_jpa_Entity_must_be_annotated_with_DomainObject_nature_of_ENTITY()` -*** `every_jdo_PersistenceCapable_must_be_annotated_with_DomainObject_nature_of_ENTITY` - -** ensure if JDO entity has a surrogate key then its annotations are consistent: -+ -For teams that like to be explicit about the use of surrogate keys: - -*** `every_jdo_PersistenceCapable_with_DATASTORE_identityType_must_be_annotated_as_DataStoreIdentity()` ** enable injected fields in entities: + For teams that use type-safe queries (and want to ensure that services do not appear superfluously as fields in the "QXxx" classes): *** `every_injected_field_of_jpa_Entity_must_be_annotated_with_Transient()` -*** `every_injected_field_of_jdo_PersistenceCapable_must_be_annotated_with_NotPersistent()` ** encourage optimistic locking: + For teams that prefer optimistic locking as a standard everywhere: *** `every_jpa_Entity_must_have_a_version_field()` -*** `every_jdo_PersistenceCapable_must_be_annotated_with_Version()` ** encourage static factory methods for entities: + diff --git a/valuetypes/asciidoc/adoc/modules/asciidoc/pages/about.adoc b/valuetypes/asciidoc/adoc/modules/asciidoc/pages/about.adoc index 6f42bf2e3ad..a690df7214d 100644 --- a/valuetypes/asciidoc/adoc/modules/asciidoc/pages/about.adoc +++ b/valuetypes/asciidoc/adoc/modules/asciidoc/pages/about.adoc @@ -78,17 +78,16 @@ In addition, in the webapp module of your application, add the following depende </dependency> ---- -* and for persistence: +* and for persistence (using the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism): + [source,xml] .pom.xml ---- <dependency> <groupId>org.apache.causeway.valuetypes</groupId> - <artifactId>causeway-valuetypes-asciidoc-xxx</artifactId> <!--.--> + <artifactId>causeway-valuetypes-asciidoc-jpa</artifactId> </dependency> ---- -<.> where `xxx` is `jpa` (if using xref:pjpa::about.adoc[]) or `jdo` (if using xref:pjdo::about.adoc[]). And in your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the extension's implementation module: @@ -98,13 +97,12 @@ And in your application's xref:userguide::modules.adoc#appmanifest[App Manifest] @Configuration @Import({ CausewayModuleValAsciidocUiWkt.class, - CausewayModuleValAsciidocPersistenceXxx.class, <!--.--> - ... + CausewayModuleValAsciidocPersistenceJpa.class, + // ... }) public class AppManifest { } ---- -<.> where `Xxx` is `Jpa` (if using xref:pjpa::about.adoc[]) or `Jdo` (if using xref:pjdo::about.adoc[]). == Usage diff --git a/valuetypes/markdown/adoc/modules/markdown/pages/about.adoc b/valuetypes/markdown/adoc/modules/markdown/pages/about.adoc index 7cd99e8fc7d..05ef2828ea1 100644 --- a/valuetypes/markdown/adoc/modules/markdown/pages/about.adoc +++ b/valuetypes/markdown/adoc/modules/markdown/pages/about.adoc @@ -78,17 +78,16 @@ In addition, in the webapp module of your application, add the following depende </dependency> ---- -* and for persistence: +* and for persistence, using the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism: + [source,xml] .pom.xml ---- <dependency> <groupId>org.apache.causeway.valuetypes</groupId> - <artifactId>causeway-valuetypes-markdown-persistence-xxx</artifactId> <!--.--> + <artifactId>causeway-valuetypes-markdown-persistence-jpa</artifactId> </dependency> ---- -<.> where `xxx` is `jpa` (if using xref:pjpa::about.adoc[]) or `jdo` (if using xref:pjdo::about.adoc[]). And in your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the extension's implementation module: @@ -98,14 +97,12 @@ And in your application's xref:userguide::modules.adoc#appmanifest[App Manifest] @Configuration @Import({ CausewayModuleValMarkdownUiWkt.class, - CausewayModuleValMarkdownMetaModel.class, - - ... + CausewayModuleValMarkdownPersistenceJpa.class, + // ... }) public class AppManifest { } ---- -<.> where `Xxx` is `Jpa` (if using xref:pjpa::about.adoc[]) or `Jdo` (if using xref:pjdo::about.adoc[]). == Usage diff --git a/valuetypes/vega/adoc/modules/vega/pages/about.adoc b/valuetypes/vega/adoc/modules/vega/pages/about.adoc index 4740ed36a91..3e8abd113f0 100644 --- a/valuetypes/vega/adoc/modules/vega/pages/about.adoc +++ b/valuetypes/vega/adoc/modules/vega/pages/about.adoc @@ -79,17 +79,16 @@ In addition, in the webapp module of your application, add the following depende </dependency> ---- -* and for persistence: +* and for persistence, using the xref:pjpa:ROOT:about.adoc[JPA/Eclipselink] persistence mechanism: + [source,xml] .pom.xml ---- <dependency> <groupId>org.apache.causeway.valuetypes</groupId> - <artifactId>causeway-valuetypes-vega-xxx</artifactId> <!--.--> + <artifactId>causeway-valuetypes-vega-jpa</artifactId> </dependency> ---- -<.> where `xxx` is `jpa` (if using xref:pjpa::about.adoc[]) or `jdo` (if using xref:pjdo::about.adoc[]). And in your application's xref:userguide::modules.adoc#appmanifest[App Manifest], import the extension's implementation module: @@ -99,13 +98,12 @@ And in your application's xref:userguide::modules.adoc#appmanifest[App Manifest] @Configuration @Import({ CausewayModuleValVegaUiWkt.class, - CausewayModuleValVegaPersistenceXxx.class, <!--.--> - ... + CausewayModuleValVegaPersistenceJpa.class, + // ... }) public class AppManifest { } ---- -<.> where `Xxx` is `Jpa` (if using xref:pjpa::about.adoc[]) or `Jdo` (if using xref:pjdo::about.adoc[]). == Usage
