mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-11 02:55:04 +00:00
Finish V1 of List and Item Lambdas
List and Item Lambdas and client calls should be roughly finished (pending full testing once databse config is done).
This commit is contained in:
@@ -1,18 +1,60 @@
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class List {
|
||||
Integer itemID;
|
||||
String name;
|
||||
String owner;
|
||||
LocalDateTime lastUpdated;
|
||||
ArrayList<ItemEntry> entries;
|
||||
|
||||
public List(ResultSet listRow) throws SQLException {
|
||||
itemID = listRow.getInt(1);
|
||||
name = listRow.getString(2);
|
||||
owner = listRow.getString(3);
|
||||
lastUpdated = listRow.getObject(8, LocalDateTime.class);
|
||||
lastUpdated = listRow.getObject(4, LocalDateTime.class);
|
||||
entries = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void addItemEntry(ItemEntry entry) {
|
||||
entries.add(entry);
|
||||
}
|
||||
|
||||
public ItemEntry[] getEntries() {
|
||||
return entries.toArray(new ItemEntry[entries.size()]);
|
||||
}
|
||||
|
||||
public Integer getItemID() {
|
||||
return itemID;
|
||||
}
|
||||
|
||||
public void setItemID(Integer itemID) {
|
||||
this.itemID = itemID;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public LocalDateTime getLastUpdated() {
|
||||
return lastUpdated;
|
||||
}
|
||||
|
||||
public void setLastUpdated(LocalDateTime lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user