diff options
author | Akash Keshav <112591754+domesticchores@users.noreply.github.com> | 2025-02-16 17:04:48 -0500 |
---|---|---|
committer | Akash Keshav <112591754+domesticchores@users.noreply.github.com> | 2025-02-16 17:04:48 -0500 |
commit | ad68ff259acd63818112b9997d093051dd3344ca (patch) | |
tree | b958bf84f9afb794635f631c1d7072750170d80e /ufund-api/src/main/java/com/ufund/api/ufundapi/model/Cupboard.java | |
parent | ae0bff7e12edbd6f4e76cf32468f5d5607e770a6 (diff) | |
parent | b25ec2813c14d21824e8d1af78ac478b35bac8bc (diff) | |
download | JellySolutions-ad68ff259acd63818112b9997d093051dd3344ca.tar.gz JellySolutions-ad68ff259acd63818112b9997d093051dd3344ca.tar.bz2 JellySolutions-ad68ff259acd63818112b9997d093051dd3344ca.zip |
Merge branch 'main' of https://github.com/RIT-SWEN-261-02/team-project-2245-swen-261-02-2b
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.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); - } - -} |