java.lang.Object
edu.ntnu.idatt1002.k1g4.dao.DivisionDAO
The Database Access Object for the class Division.
- Version:
- 0.1
- Author:
- Callum Gran
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDivision
(Division division) Method to add a division to the database.void
deleteDivision
(int divisionId) Method to delete a division from the database.getDivisionsByCup
(int cupId) Gets all divisions with respective data in a cup.
-
Constructor Details
-
DivisionDAO
public DivisionDAO()
-
-
Method Details
-
getDivisionsByCup
Gets all divisions with respective data in a cup.- Parameters:
cupId
- int: The id of the cup- Returns:
- divisions ArrayList: The divisions that belong to a cup
-
addDivision
Method to add a division to the database.- Parameters:
division
- Division: the division to be added.
-
deleteDivision
public void deleteDivision(int divisionId) Method to delete a division from the database.- Parameters:
divisionId
- int: the id of the division to be deleted
-