org.deltava.dao
Class GetNews

java.lang.Object
  extended by org.deltava.dao.DAO
      extended by org.deltava.dao.GetNews

public class GetNews
extends DAO

A Data Access Object to read System News entries.

Since:
1.0
Version:
3.1
Author:
Luke

Field Summary
 
Fields inherited from class org.deltava.dao.DAO
_ps, _queryMax, _queryStart, _queryTimeout
 
Constructor Summary
GetNews(Connection c)
          Initializes the DAO with a given JDBC connection.
 
Method Summary
 List<? extends News> getActiveNOTAMs()
          Returns the latest active Notices to Airmen (NOTAMs).
 List<? extends News> getNews()
          Returns the latest System News entries.
 News getNews(int id)
          Returns a System News entry with a specific ID.
 Notice getNOTAM(int id)
          Returns a Notice to Airmen (NOTAM) with a specific ID.
 List<? extends News> getNOTAMs()
          Returns the latest Notices to Airmen (NOTAMs).
 
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

GetNews

public GetNews(Connection c)
Initializes the DAO with a given JDBC connection.

Parameters:
c - the JDBC connection to use
Method Detail

getNews

public News getNews(int id)
             throws DAOException
Returns a System News entry with a specific ID.

Parameters:
id - the database ID of the entry
Returns:
the System News entry
Throws:
DAOException - if a JDBC error occurs

getNews

public List<? extends News> getNews()
                             throws DAOException
Returns the latest System News entries.

Returns:
a List of News beans
Throws:
DAOException - if a JDBC error occurs

getNOTAM

public Notice getNOTAM(int id)
                throws DAOException
Returns a Notice to Airmen (NOTAM) with a specific ID.

Parameters:
id - the database ID of the entry
Returns:
the Notice to Airmen entry
Throws:
DAOException - if a JDBC error occurs

getNOTAMs

public List<? extends News> getNOTAMs()
                               throws DAOException
Returns the latest Notices to Airmen (NOTAMs).

Returns:
a List of Notice beans
Throws:
DAOException - if a JDBC error occurs

getActiveNOTAMs

public List<? extends News> getActiveNOTAMs()
                                     throws DAOException
Returns the latest active Notices to Airmen (NOTAMs).

Returns:
a List of Notice beans
Throws:
DAOException - if a JDBC error occurs


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