diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-02-16 15:05:39 -0500 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-02-16 15:05:39 -0500 |
commit | d6f563c6288052e719f48939f484148b3068fead (patch) | |
tree | 4f2d33aab4ff123c3a5bef0b5089ca2eb802ba0a /ufund-api/src/main/java/com/ufund/api/ufundapi/model | |
parent | 781da6af80a6a1391bfe1d6445f6d59a28362c72 (diff) | |
download | JellySolutions-d6f563c6288052e719f48939f484148b3068fead.tar.gz JellySolutions-d6f563c6288052e719f48939f484148b3068fead.tar.bz2 JellySolutions-d6f563c6288052e719f48939f484148b3068fead.zip |
Refactor: Remove Cupboard.java
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/model')
-rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/model/Cupboard.java | 51 |
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); - } - -} |