Class GetImage

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

public class GetImage extends DAO
A Data Access Object to retrieve image data from the database.
Since:
1.0
Version:
10.5
Author:
Luke
  • Constructor Details

    • GetImage

      public GetImage(Connection c)
      Initializes the DAO from a JDBC connection.
      Parameters:
      c - the JDBC connection
  • Method Details

    • getSignatureImage

      public byte[] getSignatureImage(int id, String dbName) throws DAOException
      Returns a signature image for a Pilot.
      Parameters:
      id - the pilot ID
      dbName - the database containing the signature
      Returns:
      the signature image data
      Throws:
      DAOException - if a JDBC error occurs
    • getSigModified

      public Instant getSigModified(int id, String dbName) throws DAOException
      Returns the last modification date of a Pilot signature.
      Parameters:
      id - the Pilot's database ID
      dbName - the database containing the signature
      Returns:
      the signature last modified date/time, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getEventBanner

      public byte[] getEventBanner(int id) throws DAOException
      Returns an Online Event banner image.
      Parameters:
      id - the Event database ID
      Returns:
      the banner image data
      Throws:
      DAOException - if a JDBC error occurs
    • getPartnerBanner

      public byte[] getPartnerBanner(int id) throws DAOException
      Returns a Partner banner image.
      Parameters:
      id - the Partner database ID
      Returns:
      the banner image data
      Throws:
      DAOException - if a JDBC error occurs
    • getChart

      public byte[] getChart(int id) throws DAOException
      Returns a Chart.
      Parameters:
      id - the chart ID
      Returns:
      the chart image data
      Throws:
      DAOException - if a JDBC error occurs
    • getNews

      public byte[] getNews(int id) throws DAOException
      Returns a System News banner image.
      Parameters:
      id - the News entry id
      Returns:
      the banner image data
      Throws:
      DAOException - if a JDBC error occurs
    • getNOTAM

      public byte[] getNOTAM(int id) throws DAOException
      Returns a NOTAM banner image.
      Parameters:
      id - the NOTAM id
      Returns:
      the banner image data
      Throws:
      DAOException - if a JDBC error occurs
    • getGalleryImage

      public byte[] getGalleryImage(int id, String dbName) throws DAOException
      Returns a Picture Gallery image.
      Parameters:
      id - the gallery image ID
      dbName - the database name
      Returns:
      the gallery image data
      Throws:
      DAOException - if a JDBC error occurs
    • getExamResource

      public byte[] getExamResource(int id) throws DAOException
      Returns a Testing Center resource image.
      Parameters:
      id - the question ID
      Returns:
      the question image data
      Throws:
      DAOException - if a JDBC error occurs
    • getTile

      public byte[] getTile(TileAddress addr) throws DAOException
      Returns an ACARS track tile.
      Parameters:
      addr - the TileAddress
      Returns:
      the PNG tile data, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • isSignatureAuthorized

      public boolean isSignatureAuthorized(int id) throws DAOException
      Returns if a Water Cooler signature image is officially approved.
      Parameters:
      id - the Pilot's database ID
      Returns:
      TRUE if approved, otherwise FALSE
      Throws:
      DAOException - if a JDBC error occurs