mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-16 02:38:47 +00:00
Shift ItemEntry columns for listID
listID is in column 1
This commit is contained in:
parent
fad60c6b90
commit
3feb8a4317
@ -1,6 +1,5 @@
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class ItemEntry {
|
||||
Integer listID;
|
||||
@ -10,10 +9,29 @@ public class ItemEntry {
|
||||
Boolean purchased;
|
||||
public ItemEntry(Integer listID, ResultSet listRow) throws SQLException {
|
||||
this.listID = listID;
|
||||
productID = listRow.getInt(1);
|
||||
quantity = listRow.getInt(2);
|
||||
addedDate = listRow.getTimestamp(3).toInstant().toEpochMilli();
|
||||
purchased = listRow.getBoolean(4);
|
||||
productID = listRow.getInt(2);
|
||||
quantity = listRow.getInt(3);
|
||||
addedDate = listRow.getTimestamp(4).toInstant().toEpochMilli();
|
||||
purchased = listRow.getBoolean(5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ItemEntry{" +
|
||||
"listID=" + listID +
|
||||
", productID=" + productID +
|
||||
", quantity=" + quantity +
|
||||
", addedDate=" + addedDate +
|
||||
", purchased=" + purchased +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Integer getListID() {
|
||||
return listID;
|
||||
}
|
||||
|
||||
public void setListID(Integer listID) {
|
||||
this.listID = listID;
|
||||
}
|
||||
|
||||
public Integer getProductID() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user