Class SetLibrary

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetLibrary

public class SetLibrary extends DAO
A Data Access Object to write and update Fleet/Document Library metadata.
Since:
1.0
Version:
10.2
Author:
Luke
  • Constructor Details

    • SetLibrary

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

    • download

      public void download(String fName, int pilotID) throws DAOException
      Logs a file downlaod.
      Parameters:
      fName - the download file name
      pilotID - the Database ID of the user downloading the file
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(Manual m, boolean isNew) throws DAOException
      Writes a Manual to the Document Library. This handles INSERT and UPDATE operations.
      Parameters:
      m - the Manual metadata
      isNew - if we are performing an INSERT instead of an UPDATE
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(Newsletter nws) throws DAOException
      Writes a Newsletter to the Document Library. This handles INSERT and UPDATE operations.
      Parameters:
      nws - the Newsletter metadata
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(Installer i) throws DAOException
      Writes an Installer to the Fleet Library. This handles INSERT and UPDATE operations.
      Parameters:
      i - the Installer metadata
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(FileEntry e) throws DAOException
      Writes a File Library entry to the database. This handles INSERT and UPDATE operations.
      Parameters:
      e - the Library entry
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(Video v) throws DAOException
      Writes a Video Library entry to the database. This handles INSERT and UPDATE operations.
      Parameters:
      v - the Library entry
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(LibraryEntry entry) throws DAOException
      Deletes a Library Entry from the database.
      Parameters:
      entry - the Library entry
      Throws:
      DAOException - if a JDBC error occurs
      IllegalArgumentException - if an unknown LibraryEntry subclass is passed