aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Cupboard.java
diff options
context:
space:
mode:
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/model/Cupboard.java')
-rw-r--r--ufund-api/src/main/java/com/ufund/api/ufundapi/model/Cupboard.java51
1 files changed, 0 insertions, 51 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Cupboard.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Cupboard.java
deleted file mode 100644
index 0ce015c..0000000
--- a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Cupboard.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.ufund.api.ufundapi.model;
-
-import com.ufund.api.ufundapi.persistence.CupboardDAO;
-import com.ufund.api.ufundapi.persistence.CupboardFileDao;
-
-import java.io.IOException;
-
-public class Cupboard {
- CupboardDAO dao = new CupboardFileDao();
-
- public void createNeed(Need need) throws IOException {
- int id = dao.getNeeds().length;
- dao.createNeed(need);
- }
-
-// public void updateID(int id) throws IOException {
-// for (int i = 0; i < getNeeds().length; i++) {
-// needs.get(i).setID(i);
-// }
-// }
-
- public Need[] findNeeds(String name) throws IOException {
- return dao.findNeeds(name);
- }
-
- public Need updateNeed(Need need) throws IOException {
- return dao.updateNeed(need);
- }
-
- public void removeNeed(int id) throws IOException {
- dao.deleteNeed(id);
- }
-
- public void removeNeed(String name) throws IOException {
- for (Need need : getNeeds()) {
- if (need.getName().equals(name)) {
- dao.deleteNeed(need.getId());
- return;
- }
- }
- }
-
- public Need[] getNeeds() throws IOException {
- return dao.getNeeds();
- }
-
- public Need getNeed(int id) throws IOException {
- return dao.getNeed(id);
- }
-
-}