Class SetNavData

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

public class SetNavData extends DAO
A Data Access Object to update Navigation data.
Since:
1.0
Version:
9.0
Author:
Luke
  • Constructor Details

    • SetNavData

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

    • write

      public void write(Collection<NavigationDataBean> nds) throws DAOException
      Writes an entry to the Navigation Data table.
      Parameters:
      nds - a Collection of NavigationDataBeans
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(Airway a) throws DAOException
      Writes an Airway entry to the database.
      Parameters:
      a - an Airway bean
      Throws:
      DAOException - if a JDBC error occurs
      See Also:
    • writeRoute

      public void writeRoute(TerminalRoute tr) throws DAOException
      Writes an SID/STAR entry to the database.
      Parameters:
      tr - an TerminalRoute bean
      Throws:
      DAOException - if a JDBC error occurs
      See Also:
    • updateAirwayWaypoints

      public int updateAirwayWaypoints() throws DAOException
      Updates Airway waypoint types from the Navigation Data table. This will also load the ICAO region codes.
      Returns:
      the nuber of entries updated
      Throws:
      DAOException - if a JDBC error occurs
    • updateTRWaypoints

      public int updateTRWaypoints() throws DAOException
      Updates Terminal Route waypoint types from the Navigation Data table. This will also load the ICAO region codes.
      Returns:
      the nuber of entries updated
      Throws:
      DAOException - if a JDBC error occurs
    • updateRegions

      public int updateRegions(Navaid navaidType) throws DAOException
      Updates the ICAO Region code for navigation data entries.
      Parameters:
      navaidType - the navigation aid type
      Returns:
      the nuber of entries updated
      Throws:
      DAOException - if a JDBC error occurs
    • updateLegacy

      public int updateLegacy(Navaid navaidType) throws DAOException
      Copies navigation data from legacy airports.
      Parameters:
      navaidType - the navigation aid type
      Returns:
      the nuber of entries updated
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(TerminalRoute tr) throws DAOException
      Deletes a Terminal Route from the database.
      Parameters:
      tr - the TerminalRoute bean
      Throws:
      DAOException - if a JDBC error occurs
    • purge

      public int purge(Navaid navaidType) throws DAOException
      Purges Navigation Aid records from the database.
      Parameters:
      navaidType - the navaid type
      Returns:
      the number of records deleted
      Throws:
      DAOException - if a JDBC error occurs
    • purgeAirways

      public int purgeAirways() throws DAOException
      Purges Airway records from the database.
      Returns:
      the number of records deleted
      Throws:
      DAOException - if a JDBC error occurs
    • purgeTerminalRoutes

      public int purgeTerminalRoutes(TerminalRoute.Type routeType) throws DAOException
      Purges Terminal Route records from the database.
      Parameters:
      routeType - the Terminal Route type
      Returns:
      the number of records deleted
      Throws:
      DAOException - if a JDBC error occurs