Class DivisionDAO

java.lang.Object
edu.ntnu.idatt1002.k1g4.dao.DivisionDAO

public class DivisionDAO extends Object
The Database Access Object for the class Division.
Version:
0.1
Author:
Callum Gran
  • Constructor Details

    • DivisionDAO

      public DivisionDAO()
  • Method Details

    • getDivisionsByCup

      public ArrayList<Division> getDivisionsByCup(int cupId)
      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

      public void addDivision(Division division)
      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