Class SetChart

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

public class SetChart extends DAO
A Data Access Object to write Approach Charts.
Since:
1.0
Version:
10.6
Author:
Luke
  • Constructor Details

    • SetChart

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

    • write

      public void write(Chart c) throws DAOException
      Adds or updates an Approach Chart to the database.
      Parameters:
      c - the Chart bean
      Throws:
      DAOException - if a JDBC error occurs
    • update

      public void update(Chart c) throws DAOException
      Updates an Approach Chart's metadata.
      Parameters:
      c - the Approach Chart
      Throws:
      DAOException - if a JDBC error occurs
    • save

      public void save(Chart c) throws DAOException
      Saves an approach chart image.
      Parameters:
      c - the Chart
      Throws:
      IllegalStateException - if the Chart is not loaded
      DAOException - if a JDBC error occurs
    • logUse

      public void logUse(Chart c) throws DAOException
      Updates an Approach Chart's usage counter.
      Parameters:
      c - the Approach Chart
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(int id) throws DAOException
      Deletes an Approach Chart from the Database.
      Parameters:
      id - the Chart database ID
      Throws:
      DAOException - if a JDBC error occurs