Class TrainingPlanDAOImpl

java.lang.Object
it.unisa.c03.myPersonalTrainer.trainingplan.dao.TrainingPlanDAOImpl
All Implemented Interfaces:
TrainingPlanDAO

public class TrainingPlanDAOImpl
extends java.lang.Object
implements TrainingPlanDAO
  • Constructor Summary

    Constructors
    Constructor Description
    TrainingPlanDAOImpl()  
  • Method Summary

    Modifier and Type Method Description
    boolean deleteTrainingPlan​(java.lang.String email)
    This method deletes a TrainingPlan.
    java.util.Collection<TrainingPlan> getTrainingPlansByEmail​(java.lang.String email)
    This method extracts training plans into database.
    boolean insertTrainingPlan​(TrainingPlan tp)
    This method adds a new TrainingPlan.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TrainingPlanDAOImpl

      public TrainingPlanDAOImpl()
  • Method Details

    • insertTrainingPlan

      public boolean insertTrainingPlan​(TrainingPlan tp) throws java.io.IOException
      This method adds a new TrainingPlan.
      Specified by:
      insertTrainingPlan in interface TrainingPlanDAO
      Parameters:
      tp - the training plan
      Returns:
      true
      Throws:
      java.io.IOException
    • deleteTrainingPlan

      public boolean deleteTrainingPlan​(java.lang.String email) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
      This method deletes a TrainingPlan.
      Specified by:
      deleteTrainingPlan in interface TrainingPlanDAO
      Parameters:
      email -
      Returns:
      true
      Throws:
      java.io.IOException
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • getTrainingPlansByEmail

      public java.util.Collection<TrainingPlan> getTrainingPlansByEmail​(java.lang.String email) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
      This method extracts training plans into database.
      Specified by:
      getTrainingPlansByEmail in interface TrainingPlanDAO
      Parameters:
      email - of the customer
      Returns:
      List of customer's training plan.
      Throws:
      java.io.IOException
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException