Skip to content

Commit

Permalink
access datatable value without using setter
Browse files Browse the repository at this point in the history
  • Loading branch information
firestar committed Jul 4, 2024
1 parent c1cef21 commit ca394d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ public class DataEntry<T> implements Serializable, Comparable<DataEntry> {
public String key;
public long version = 0;
public T data;

@JsonIgnore
private transient String tableName;

private Instant created;
private Instant modified;

private String request;

@JsonIgnore
public transient DataTable dataTable;

Expand Down Expand Up @@ -169,11 +172,4 @@ public void setRequest(String request) {
this.request = request;
}

public DataTable getDataTable() {
return dataTable;
}

public void setDataTable(DataTable dataTable) {
this.dataTable = dataTable;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void loadSavedData() {
throw new RuntimeException(ex);
}
}
entry.setDataTable(this);
entry.dataTable = this;
entry.setTableName(this.config.getTable());
});
} catch (IOException e) {
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/com/nucleodb/library/EventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ public void delete(Delete delete, AuthorDE entry) {
assertEquals(1, deleted.get());

} catch (InterruptedException e) {
e.printStackTrace();

throw new RuntimeException(e);
} catch (IncorrectDataEntryObjectException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
Expand Down

0 comments on commit ca394d0

Please sign in to comment.