Interface FamilyTreeDAO

All Known Implementing Classes:
FamilyTreeDAOImpl

public interface FamilyTreeDAO
Data Access Object interface for managing FamilyTree entities in the database.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Creates all family tree related tables in the database.
    static void
    dropTables(Connection connection)
    Drops all family tree related tables from the database if they exist.
    Loads a complete family tree from the database.
    void
    save(FamilyTree familyTree)
    Saves a complete family tree to the database.
  • Method Details

    • dropTables

      static void dropTables(Connection connection) throws SQLException
      Drops all family tree related tables from the database if they exist.
      Parameters:
      connection - the database connection to use
      Throws:
      SQLException - if a database error occurs
    • createTables

      static void createTables(Connection connection) throws SQLException
      Creates all family tree related tables in the database.
      Parameters:
      connection - the database connection to use
      Throws:
      SQLException - if a database error occurs
    • save

      void save(FamilyTree familyTree) throws SQLException
      Saves a complete family tree to the database. This includes all persons and marriages in the tree.
      Parameters:
      familyTree - the family tree to save
      Throws:
      SQLException - if a database error occurs
    • load

      Loads a complete family tree from the database. This includes all persons and marriages, with relationships properly resolved.
      Returns:
      the family tree loaded from the database
      Throws:
      SQLException - if a database error occurs