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 booleandeleteTrainingPlan(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.booleaninsertTrainingPlan(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
This method adds a new TrainingPlan.- Specified by:
insertTrainingPlanin interfaceTrainingPlanDAO- 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.InterruptedExceptionThis method deletes a TrainingPlan.- Specified by:
deleteTrainingPlanin interfaceTrainingPlanDAO- Parameters:
email-- Returns:
- true
- Throws:
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-
getTrainingPlansByEmail
public java.util.Collection<TrainingPlan> getTrainingPlansByEmail(java.lang.String email) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedExceptionThis method extracts training plans into database.- Specified by:
getTrainingPlansByEmailin interfaceTrainingPlanDAO- Parameters:
email- of the customer- Returns:
- List of customer's training plan.
- Throws:
java.io.IOExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-