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

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e7df078ff ISIS-3010: JDO: fixes DN JPA enhancer run for IDE powered 
build (Eclipse)
8e7df078ff is described below

commit 8e7df078ffc99c0c5614a13b6d7931c86c26fc66
Author: andi-huber <[email protected]>
AuthorDate: Fri Apr 15 20:04:12 2022 +0200

    ISIS-3010: JDO: fixes DN JPA enhancer run for IDE powered build
    (Eclipse)
---
 .../commandlog/applib/command/CommandLog.java      | 29 ++++++++--------------
 extensions/core/command-log/jdo/pom.xml            | 10 ++++++++
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git 
a/extensions/core/command-log/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/command/CommandLog.java
 
b/extensions/core/command-log/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/command/CommandLog.java
index fd0f87f825..3f5792ba85 100644
--- 
a/extensions/core/command-log/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/command/CommandLog.java
+++ 
b/extensions/core/command-log/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/command/CommandLog.java
@@ -373,20 +373,14 @@ implements
      * to persist if using h2 (perhaps would need to be mapped differently).
      * @see <a 
href="https://www.datanucleus.org/products/accessplatform/jdo/mapping.html#_other_types";>www.datanucleus.org</a>
      */
-
+    @Id
+    @Column(nullable=false, name = "interactionId", length = 36)
     @Property(domainEvent = InteractionIdDomainEvent.class)
     @PropertyLayout(named = "Interaction Id")
-    //@Getter
-    @Setter
+    @Getter @Setter
     private String interactionIdStr;
 
-    @Id
-    @Column(nullable=false, name = "interactionId", length = 36)
-    public String getInteractionIdStr() {
-        return interactionIdStr;
-    }
-
-
+    @Transient
     @Programmatic
     @Override
     public UUID getInteractionId() {return 
UUID.fromString(getInteractionIdStr());}
@@ -400,14 +394,13 @@ implements
 
 
     public static class TimestampDomainEvent extends 
PropertyDomainEvent<Timestamp> { }
-
     @Column(nullable=false)
     @Property(domainEvent = TimestampDomainEvent.class)
     @Getter @Setter
     private Timestamp timestamp;
 
 
-
+    @Transient
     @Override
     public ChangeType getType() {
         return ChangeType.COMMAND;
@@ -439,7 +432,6 @@ implements
 
 
     public static class ParentDomainEvent extends PropertyDomainEvent<Command> 
{ }
-
     @Column(name="parentId", nullable=true)
     @Property(domainEvent = ParentDomainEvent.class)
     @PropertyLayout(hidden = Where.ALL_TABLES)
@@ -448,22 +440,24 @@ implements
 
 
     public static class TargetDomainEvent extends PropertyDomainEvent<String> 
{ }
-
     @Column(nullable=true, length = 2000, name="target")
     @Property(domainEvent = TargetDomainEvent.class)
     @PropertyLayout(named = "Object")
     @Getter @Setter
     private Bookmark target;
 
+    @Transient
     public String getTargetStr() {
         return 
Optional.ofNullable(getTarget()).map(Bookmark::toString).orElse(null);
     }
 
+    @Transient
     @Override
     public String getTargetMember() {
         return getCommandDto().getMember().getLogicalMemberIdentifier();
     }
 
+    @Transient
     @Property(domainEvent = TargetDomainEvent.class)
     @PropertyLayout(named = "Member")
     public String getLocalMember() {
@@ -480,7 +474,6 @@ implements
 
 
     public static class CommandDtoDomainEvent extends 
PropertyDomainEvent<CommandDto> { }
-
     @Lob @Basic(fetch=FetchType.LAZY)
     @Column(nullable=true, columnDefinition="CLOB")
     @Property(domainEvent = CommandDtoDomainEvent.class)
@@ -490,7 +483,6 @@ implements
 
 
     public static class StartedAtDomainEvent extends 
PropertyDomainEvent<Timestamp> { }
-
     @Column(nullable=true)
     @Property(domainEvent = StartedAtDomainEvent.class)
     @Getter @Setter
@@ -498,7 +490,6 @@ implements
 
 
     public static class CompletedAtDomainEvent extends 
PropertyDomainEvent<Timestamp> { }
-
     @Column(nullable=true)
     @Property(domainEvent = CompletedAtDomainEvent.class)
     @Getter @Setter
@@ -549,7 +540,6 @@ implements
 
 
     public static class ResultDomainEvent extends PropertyDomainEvent<String> 
{ }
-
     @Column(nullable=true, length = 2000, name="result")
     @Property(domainEvent = ResultDomainEvent.class)
     @PropertyLayout(hidden = Where.ALL_TABLES, named = "Result Bookmark")
@@ -585,12 +575,13 @@ implements
         return getException() != null;
     }
 
-
+    @Transient
     @Override
     public String getPreValue() {
         return null;
     }
 
+    @Transient
     @Override
     public String getPostValue() {
         return null;
diff --git a/extensions/core/command-log/jdo/pom.xml 
b/extensions/core/command-log/jdo/pom.xml
index 430b875cc7..dbe393a434 100644
--- a/extensions/core/command-log/jdo/pom.xml
+++ b/extensions/core/command-log/jdo/pom.xml
@@ -57,6 +57,16 @@
             <groupId>org.apache.isis.persistence</groupId>
                        
<artifactId>isis-persistence-jdo-datanucleus</artifactId>
         </dependency>
+        
+        <!-- this dependency must not be transitive, its sole purpose is 
+        to allow the DN enhancer to pick it up in order to process JPA 
annotations; 
+        and thats only required when building with an IDE (Eclipse) and not 
with Maven;
+        the Maven build has its own DN enhancer plugin, which also has its own 
dependencies declared -->
+       <dependency>
+                       <groupId>org.datanucleus</groupId>
+                       <artifactId>datanucleus-api-jpa</artifactId>
+                       <scope>provided</scope>
+               </dependency>
 
         <!-- Testing -->
 

Reply via email to