List renaming

Added list reanming through a ListPUT lambda. Potentially could be used to alter other List aspects in the future.

Also renamed itemID to listID for semantic unity
This commit is contained in:
NMerz
2020-11-15 17:55:25 -05:00
parent 06d834eb01
commit 616caa1e10
8 changed files with 80 additions and 30 deletions

View File

@@ -3,7 +3,7 @@ import java.sql.SQLException;
import java.util.ArrayList;
public class List {
Integer itemID;
Integer listID;
String name;
String owner;
long lastUpdated;
@@ -11,7 +11,7 @@ public class List {
boolean shared;
public List(ResultSet listRow, boolean shared) throws SQLException {
itemID = listRow.getInt("listID");
listID = listRow.getInt("listID");
name = listRow.getString("name");
owner = listRow.getString("owner");
lastUpdated = listRow.getTimestamp("lastUpdated").toInstant().toEpochMilli();
@@ -26,7 +26,7 @@ public class List {
@Override
public String toString() {
return "List{" +
"itemID=" + itemID +
"listID=" + listID +
", name='" + name + '\'' +
", owner='" + owner + '\'' +
", lastUpdated=" + lastUpdated +
@@ -38,12 +38,12 @@ public class List {
return entries.toArray(new ItemEntry[entries.size()]);
}
public Integer getItemID() {
return itemID;
public Integer getListID() {
return listID;
}
public void setItemID(Integer itemID) {
this.itemID = itemID;
public void setListID(Integer listID) {
this.listID = listID;
}
public String getName() {