Class GetCountry

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

public class GetCountry extends DAO
A Data Access Object to load ISO-3316 country codes and perform geolocation.
Since:
3.2
Version:
11.3
Author:
Luke
  • Constructor Details

    • GetCountry

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

    • initAll

      public int initAll() throws DAOException
      Initializes all country codes.
      Returns:
      the number of countries loaded
      Throws:
      DAOException - if a JDBC error occurs
    • find

      public Country find(GeoLocation loc, boolean isAirspace) throws DAOException
      Determines what country covers a particular point.
      Parameters:
      loc - a GeoLocation
      isAirspace - TRUE if we want INTL returned if no match, otherwise FALSE
      Returns:
      a Country object, or null/INTL if none found
      Throws:
      DAOException - if a JDBC error occurs
      See Also: