aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java4
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardFileDao.java27
2 files changed, 29 insertions, 2 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java
index 65a6656..4e67cf7 100644
--- a/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java
+++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardDAO.java
@@ -18,7 +18,7 @@ public interface CupboardDAO {
Need[] getNeeds() throws IOException;
/**
- * Finds all {@linkplain Hero heroes} whose name contains the given text
+ * Finds all {@linkplain Need needs} whose name contains the given text
*
* @param containsText The text to match against
*
@@ -44,7 +44,7 @@ public interface CupboardDAO {
/**
* Creates and saves a {@linkplain Need need}
*
- * @param hero {@linkplain Need need} object to be created and saved
+ * @param need {@linkplain Need need} object to be created and saved
* <br>
* The id of the need object is automatically incremented.
*
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardFileDao.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardFileDao.java
new file mode 100644
index 0000000..dda20b8
--- /dev/null
+++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/CupboardFileDao.java
@@ -0,0 +1,27 @@
+package com.ufund.api.ufundapi;
+
+import java.util.ArrayList;
+
+public class CupboardFileDao {
+
+ private ArrayList<Need> needs;
+ private final String filePath;
+
+ public CupboardFileDao(String filepath) {
+ this.filePath = filepath;
+ }
+
+ public ArrayList<Need> getNeeds() {
+ return needs;
+ }
+
+ public String getFilePath() {
+ return filePath;
+ }
+
+ public void addNeed(Need need) {
+ needs.add(need);
+ }
+
+
+} \ No newline at end of file