org.deltava.dao
Class GetIPLocation

java.lang.Object
  extended by org.deltava.dao.DAO
      extended by org.deltava.dao.GetIPLocation
All Implemented Interfaces:
CachingDAO

public class GetIPLocation
extends DAO
implements CachingDAO

A Data Access Object to geo-locate IP addresses.

Since:
2.5
Version:
2.6
Author:
Luke

Field Summary
 
Fields inherited from class org.deltava.dao.DAO
_ps, _queryMax, _queryStart, _queryTimeout
 
Constructor Summary
GetIPLocation(Connection c)
          Initializes the Data Access Object.
 
Method Summary
 IPAddressInfo get(String addr)
          Retrieves Geolocation data for a particular IP address.
 CacheInfo getCacheInfo()
          Returns the cache information.
 
Methods inherited from class org.deltava.dao.DAO
commitTransaction, createTimestamp, executeUpdate, expandDate, formatDBName, getNewID, getQueryCount, prepareStatement, prepareStatementWithoutLimits, rollbackTransaction, setManualCommit, setQueryMax, setQueryStart, setQueryTimeout, startTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetIPLocation

public GetIPLocation(Connection c)
Initializes the Data Access Object.

Parameters:
c - the JDBC connection to use
Method Detail

getCacheInfo

public CacheInfo getCacheInfo()
Description copied from interface: CachingDAO
Returns the cache information.

Specified by:
getCacheInfo in interface CachingDAO
Returns:
a CacheInfo bean

get

public IPAddressInfo get(String addr)
                  throws DAOException
Retrieves Geolocation data for a particular IP address.

Parameters:
addr - the IP address
Returns:
information about this IP address, or null if none found
Throws:
DAOException - if a JDBC error occurs


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.