Class GetDocuments


public class GetDocuments extends GetLibrary
A Data Access Object to load Documents from the Libraries.
Since:
1.0
Version:
10.2
Author:
Luke
  • Constructor Details

    • GetDocuments

      public GetDocuments(Connection c)
      Initializes the Data Access Object.
      Parameters:
      c - the JDBC connection to use
  • Method Details

    • getManual

      public Manual getManual(String fName, String dbName) throws DAOException
      Returns metadata about a specific Manual .
      Parameters:
      fName - the filename
      dbName - the database name
      Returns:
      a Manual, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getNewsletter

      public Newsletter getNewsletter(String fName, String dbName) throws DAOException
      Returns metadata about a specific Newsletter.
      Parameters:
      fName - the filename
      dbName - the database name
      Returns:
      a Newsletter, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getNewsletters

      public Collection<Newsletter> getNewsletters(String dbName) throws DAOException
      Returns all newsletters. This takes a database name so we can display the contents of other airlines' libraries.
      Parameters:
      dbName - the database name
      Returns:
      a Collection of Newsletter beans
      Throws:
      DAOException - if a JDBC error occurs
    • getNewslettersByCategory

      public Collection<Newsletter> getNewslettersByCategory(String catName) throws DAOException
      Returns all Newsletters within a particular category.
      Parameters:
      catName - the category name
      Returns:
      a Collection of Newsletter beans
      Throws:
      DAOException - if a JDBC error occurs
    • getRegistrationManuals

      public Collection<Manual> getRegistrationManuals() throws DAOException
      Returns the contents of the Document Library that are available on the Registration page.
      Returns:
      a Collection of Manual beans
      Throws:
      DAOException - if a JDBC error occurs
    • getManuals

      public Collection<Manual> getManuals(String dbName) throws DAOException
      Returns the contents of the Document Library. This takes a database name so we can display the contents of other airlines' libraries.
      Parameters:
      dbName - the database name
      Returns:
      a Collection of Manual beans
      Throws:
      DAOException - if a JDBC error occurs
    • getByCertification

      public Collection<Manual> getByCertification(String dbName, String certName) throws DAOException
      Returns all Manuals associated with a particular Flight Academy certification.
      Parameters:
      dbName - the database name
      certName - the Certification name
      Returns:
      a Collection of Manual beans
      Throws:
      DAOException - if a JDBC error occurs