Skip to content

Commit

Permalink
add date to connections
Browse files Browse the repository at this point in the history
  • Loading branch information
firestar committed Oct 5, 2023
1 parent c283dec commit e0b290b
Show file tree
Hide file tree
Showing 3 changed files with 15 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.6.5'
version = '1.6.6'

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.8.0'
version = '1.8.1'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,6 +24,7 @@ public class Connection implements Serializable, Comparable<Connection>{
private String toKey;
private String toTable;
private String label;
private Date date;

public long version = 0;

Expand All @@ -33,6 +35,7 @@ public class Connection implements Serializable, Comparable<Connection>{

public Connection() {
this.setUuid(UUID.randomUUID().toString());
this.setDate(new Date());
}

public Connection(DataEntry from, String label, DataEntry to) {
Expand All @@ -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<String, String> metadata) {
Expand All @@ -52,6 +56,7 @@ public Connection(DataEntry from, String label, DataEntry to, Map<String, String
this.metadata = metadata;
this.toTable = to.getTableName();
this.fromTable = from.getTableName();
this.setDate(new Date());
}

public String getFromKey() {
Expand Down Expand Up @@ -122,6 +127,14 @@ public void versionIncrease(){
version+=1;
}

public Date getDate() {
return date;
}

public void setDate(Date date) {
this.date = date;
}

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

0 comments on commit e0b290b

Please sign in to comment.