Package edu.pdx.cs.joy.family
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 TypeMethodDescriptionstatic voidcreateTables(Connection connection) Creates all family tree related tables in the database.static voiddropTables(Connection connection) Drops all family tree related tables from the database if they exist.load()Loads a complete family tree from the database.voidsave(FamilyTree familyTree) Saves a complete family tree to the database.
-
Method Details
-
dropTables
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
Creates all family tree related tables in the database.- Parameters:
connection- the database connection to use- Throws:
SQLException- if a database error occurs
-
save
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
-