Class GetResources

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

public class GetResources extends DAO
A Data Access Object to load Web Resource data.
Since:
1.0
Version:
10.4
Author:
Luke
  • Constructor Details

    • GetResources

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

    • get

      public Resource get(int id) throws DAOException
      Returns a Web Resource.
      Parameters:
      id - the database ID
      Returns:
      the Resource bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getAll

      public Collection<Resource> getAll(String catName, String orderBy) throws DAOException
      Returns all Web Resources.
      Parameters:
      catName - the category name, or null
      orderBy - the sorting SQL fragment
      Returns:
      a Collection of Resource beans
      Throws:
      DAOException - if a JDBC error occurs
    • getAll

      public Collection<Resource> getAll(String catName, int id, String orderBy) throws DAOException
      Returns Web Resources available to a particular user.
      Parameters:
      catName - the category name, or null
      id - the user's database ID
      orderBy - the sorting SQL fragment
      Returns:
      a Collection of Resource beans
      Throws:
      DAOException - if a JDBC error occurs
    • getByCertification

      public Collection<Resource> getByCertification(String dbName, String certName) throws DAOException
      Returns all Resources associated with a particular Flight Academy certification.
      Parameters:
      dbName - the database name
      certName - the Certification name
      Returns:
      a Collection of Resource beans
      Throws:
      DAOException - if a JDBC error occurs