Class GetCountry
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetCountry
A Data Access Object to load ISO-3316 country codes and perform geolocation.
- Since:
- 3.2
- Version:
- 11.3
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfind
(GeoLocation loc, boolean isAirspace) Determines what country covers a particular point.int
initAll()
Initializes all country codes.Methods inherited from class org.deltava.dao.DAO
commitTransaction, createTimestamp, executeIDs, executeUpdate, executeUpdate, expandDate, formatDBName, formatLocation, getNewID, getQueryCount, prepare, prepareWithoutLimits, rollbackTransaction, setQueryMax, setQueryStart, setQueryTimeout, startTransaction, toID, toID, toInstant
-
Constructor Details
-
GetCountry
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
initAll
Initializes all country codes.- Returns:
- the number of countries loaded
- Throws:
DAOException
- if a JDBC error occurs
-
find
Determines what country covers a particular point.- Parameters:
loc
- a GeoLocationisAirspace
- 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:
-