Class GetACARSBuilds

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

public class GetACARSBuilds extends DAO
A Data Access Object to load ACARS build data.
Since:
4.1
Version:
10.0
Author:
Luke
  • Constructor Details

    • GetACARSBuilds

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

    • getLatestBeta

      public ClientInfo getLatestBeta(ClientVersion ver) throws DAOException
      Returns the latest beta version for a particular ACARS build.
      Parameters:
      ver - the ClientVersion
      Returns:
      a ClientInfo bean, or null if none
      Throws:
      DAOException - if a JDBC error occurs
    • getLatestBuild

      public ClientInfo getLatestBuild(ClientInfo info) throws DAOException
      Returns the latest build for a particular ACARS version and client type.
      Parameters:
      info - the ClientInfo
      Returns:
      a ClientInfo bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getLatestBuild

      public ClientInfo getLatestBuild(ClientInfo info, boolean isForced) throws DAOException
      Returns the latest build for a particular ACARS version and client type.
      Parameters:
      info - the ClientInfo
      isForced - TRUE if selecting minimum build to force an upgrade
      Returns:
      a ClientInfo bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • isValid

      public boolean isValid(ClientInfo inf) throws DAOException
      Returns whether a particular client/build/beta combination can connect to ACARS.
      Parameters:
      inf - a ClientInfo bean
      Returns:
      TRUE if can connect, otherwise FALSE
      Throws:
      DAOException - if a JDBC error occurs
    • isValid

      public boolean isValid(ClientInfo inf, AccessRole role) throws DAOException
      Returns whether a particular client/build/beta combination can access ACARS.
      Parameters:
      inf - a ClientInfo bean
      role - the Access role
      Returns:
      TRUE if can connect, otherwise FALSE
      Throws:
      DAOException - if a JDBC error occurs
    • isDispatchAvailable

      public boolean isDispatchAvailable(ClientVersion inf) throws DAOException
      Returns whether a particular ACARS build can request Dispatch service.
      Parameters:
      inf - a ClientInfo bean
      Returns:
      TRUE if Dispatch service can be requested, otherwise FALSE
      Throws:
      DAOException - if a JDBC error occurs
    • getBuildStatistics

      public Collection<ClientBuildStats> getBuildStatistics(int weeks) throws DAOException
      Loads ACARS client build statistics by week.
      Parameters:
      weeks - the number of weeks to load
      Returns:
      a Collection of ClientBuildStats beans
      Throws:
      DAOException - if a JDBC error occurs