Class SetACARSLog

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetACARSLog
Direct Known Subclasses:
SetACARSPurge

public class SetACARSLog extends DAO
A Data Access Object to update or remove ACARS log entries.
Since:
1.0
Version:
10.0
Author:
Luke
  • Constructor Details

    • SetACARSLog

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

    • deleteConnection

      public void deleteConnection(long id) throws DAOException
      Deletes an ACARS Connection log entry.
      Parameters:
      id - the connection ID
      Throws:
      DAOException - if a JDBC error occurs
    • deleteInfo

      public void deleteInfo(int flightID) throws DAOException
      Deletes an ACARS Flight Information log entry, and associated position reports.
      Parameters:
      flightID - the flight ID
      Throws:
      DAOException - if a JDBC error occurs
    • logError

      public void logError(ACARSError err) throws DAOException
      Writes an ACARS Error message to the error log.
      Parameters:
      err - the Error bean
      Throws:
      DAOException - if a JDBC error occurs
    • deleteError

      public void deleteError(int id) throws DAOException
      Deletes an ACARS Error message from the error log.
      Parameters:
      id - the Error database ID
      Throws:
      DAOException - if a JDBC error occurs
    • purgeError

      public int purgeError(int build, int beta) throws DAOException
      Purges all ACARS Error messages for a given build from the error log.
      Parameters:
      build - the client build
      beta - the beta, zero for all betas and -1 for everything
      Returns:
      the number of reports deleted
      Throws:
      DAOException
    • purgeByUser

      public int purgeByUser(int userID) throws DAOException
      Purges all ACARS Error messages for a given user from the error log.
      Parameters:
      userID - the user's database ID
      Returns:
      the number of reports deleted
      Throws:
      DAOException - if a JDBC error occurs