java.lang.Object
edu.ntnu.idatt1002.k1g4.dao.CupDAO
The Database Access Object for the class Cup.
- Version:
- 0.2
- Author:
- Callum Gran
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CupDAO
public CupDAO()
-
-
Method Details
-
getCups
Gets all cups.- Returns:
- cups ArrayList: All saved cups
-
getCupByObject
Gets cup based on an already existing cup without an id.- Parameters:
cup
- Cup: The cup to fetch from the database.- Returns:
- cup Cup: the cup from the database
-
addCup
Method to add a cup to the database.- Parameters:
cup
- Cup: The cup to be added to the database
-
deleteCup
public void deleteCup(int cupId) Method to delete a cup from the database.- Parameters:
cupId
- int: the id of the cup to be deleted
-