Skip to content

Commit

Permalink
added modified date for connections
Browse files Browse the repository at this point in the history
  • Loading branch information
firestar committed Oct 26, 2023
1 parent 5df12d4 commit 03a52f2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/groovy/nucleodb.app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = 'com.nucleodb'
version = '1.7.1'
version = '1.7.2'

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/groovy/nucleodb.library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = 'com.nucleodb'
version = '1.9.1'
version = '1.9.2'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class Connection implements Serializable, Comparable<Connection>{
private String label;
private Instant date;

private Instant modified;

public long version = 0;

@JsonIgnore
Expand All @@ -37,6 +39,7 @@ public class Connection implements Serializable, Comparable<Connection>{
public Connection() {
this.uuid = UUID.randomUUID().toString();
this.date = Instant.now();
this.modified = Instant.now();
}

public Connection(DataEntry from, String label, DataEntry to) {
Expand All @@ -47,6 +50,7 @@ public Connection(DataEntry from, String label, DataEntry to) {
this.toTable = to.getTableName();
this.fromTable = from.getTableName();
this.date = Instant.now();
this.modified = Instant.now();
}

public Connection(DataEntry from, String label, DataEntry to, Map<String, String> metadata) {
Expand All @@ -58,6 +62,7 @@ public Connection(DataEntry from, String label, DataEntry to, Map<String, String
this.toTable = to.getTableName();
this.fromTable = from.getTableName();
this.date = Instant.now();
this.modified = Instant.now();
}

public String getFromKey() {
Expand Down Expand Up @@ -126,6 +131,7 @@ public void setVersion(long version) {

public void versionIncrease(){
version+=1;
this.modified = Instant.now();
}

public Instant getDate() {
Expand All @@ -136,6 +142,14 @@ public void setDate(Instant date) {
this.date = date;
}

public Instant getModified() {
return modified;
}

public void setModified(Instant modified) {
this.modified = modified;
}

@Override
protected Connection clone() {
Connection clonedConnection = new Connection();
Expand Down

0 comments on commit 03a52f2

Please sign in to comment.