Make shared info avlaible for lists

This commit is contained in:
NMerz
2020-11-01 12:00:50 -05:00
parent 2cce80ffbd
commit 9c9da446ef
3 changed files with 38 additions and 4 deletions

View File

@@ -8,13 +8,15 @@ public class List {
String owner;
long lastUpdated;
ArrayList<ItemEntry> entries;
boolean shared;
public List(ResultSet listRow) throws SQLException {
public List(ResultSet listRow, boolean shared) throws SQLException {
itemID = listRow.getInt("listID");
name = listRow.getString("name");
owner = listRow.getString("owner");
lastUpdated = listRow.getTimestamp("lastUpdated").toInstant().toEpochMilli();
entries = new ArrayList<>();
this.shared = shared;
}
public void addItemEntry(ItemEntry entry) {
@@ -67,4 +69,12 @@ public class List {
public void setLastUpdated(long lastUpdated) {
this.lastUpdated = lastUpdated;
}
public boolean getShared() {
return shared;
}
public void setShared(boolean shared) {
this.shared = shared;
}
}