mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-04-26 06:15:04 +00:00
Store uiPosition
This will later be changeable and can then be used to sort lists received by the UI controller
This commit is contained in:
@@ -9,14 +9,16 @@ public class List {
|
||||
long lastUpdated;
|
||||
ArrayList<ItemEntry> entries;
|
||||
boolean shared;
|
||||
Integer uiPosition;
|
||||
|
||||
public List(ResultSet listRow, boolean shared) throws SQLException {
|
||||
public List(ResultSet listRow, boolean shared, Integer uiPosition) 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;
|
||||
this.uiPosition = uiPosition;
|
||||
}
|
||||
|
||||
public void addItemEntry(ItemEntry entry) {
|
||||
@@ -31,6 +33,8 @@ public class List {
|
||||
", owner='" + owner + '\'' +
|
||||
", lastUpdated=" + lastUpdated +
|
||||
", entries=" + entries +
|
||||
", shared=" + shared +
|
||||
", uiPosition=" + uiPosition +
|
||||
'}';
|
||||
}
|
||||
|
||||
@@ -77,4 +81,12 @@ public class List {
|
||||
public void setShared(boolean shared) {
|
||||
this.shared = shared;
|
||||
}
|
||||
|
||||
public Integer getUiPosition() {
|
||||
return uiPosition;
|
||||
}
|
||||
|
||||
public void setUiPosition(Integer uiPosition) {
|
||||
this.uiPosition = uiPosition;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user