From e0b290b0b463c85d12832b7d2c74c128787b09e9 Mon Sep 17 00:00:00 2001 From: Nathaniel Date: Thu, 5 Oct 2023 00:28:45 -0600 Subject: [PATCH] add date to connections --- buildSrc/src/main/groovy/nucleodb.app.gradle | 2 +- buildSrc/src/main/groovy/nucleodb.library.gradle | 2 +- .../library/database/tables/Connection.java | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/nucleodb.app.gradle b/buildSrc/src/main/groovy/nucleodb.app.gradle index a457296..92013b6 100644 --- a/buildSrc/src/main/groovy/nucleodb.app.gradle +++ b/buildSrc/src/main/groovy/nucleodb.app.gradle @@ -3,7 +3,7 @@ plugins { } group = 'com.nucleodb' -version = '1.6.5' +version = '1.6.6' repositories { mavenCentral() diff --git a/buildSrc/src/main/groovy/nucleodb.library.gradle b/buildSrc/src/main/groovy/nucleodb.library.gradle index 754c97e..30dac62 100644 --- a/buildSrc/src/main/groovy/nucleodb.library.gradle +++ b/buildSrc/src/main/groovy/nucleodb.library.gradle @@ -3,7 +3,7 @@ plugins { } group = 'com.nucleodb' -version = '1.8.0' +version = '1.8.1' repositories { mavenCentral() diff --git a/library/src/main/java/com/nucleocore/library/database/tables/Connection.java b/library/src/main/java/com/nucleocore/library/database/tables/Connection.java index 4ba0d11..8684afd 100644 --- a/library/src/main/java/com/nucleocore/library/database/tables/Connection.java +++ b/library/src/main/java/com/nucleocore/library/database/tables/Connection.java @@ -7,6 +7,7 @@ import javax.xml.crypto.Data; import java.io.Serializable; +import java.util.Date; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -23,6 +24,7 @@ public class Connection implements Serializable, Comparable{ private String toKey; private String toTable; private String label; + private Date date; public long version = 0; @@ -33,6 +35,7 @@ public class Connection implements Serializable, Comparable{ public Connection() { this.setUuid(UUID.randomUUID().toString()); + this.setDate(new Date()); } public Connection(DataEntry from, String label, DataEntry to) { @@ -42,6 +45,7 @@ public Connection(DataEntry from, String label, DataEntry to) { this.label = label; this.toTable = to.getTableName(); this.fromTable = from.getTableName(); + this.setDate(new Date()); } public Connection(DataEntry from, String label, DataEntry to, Map metadata) { @@ -52,6 +56,7 @@ public Connection(DataEntry from, String label, DataEntry to, Map