package edu.northwestern.bioinformatics.studycalendar.dao;

import edu.northwestern.bioinformatics.studycalendar.domain.PlannedActivity;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Rhett Sutphin
 */
@Transactional (readOnly=true)
public class PlannedActivityDao extends StudyCalendarMutableDomainObjectDao<PlannedActivity> {
    @Override
    public Class<PlannedActivity> domainClass() {
        return PlannedActivity.class;
    }

    @Transactional(readOnly=false)
    public void delete(PlannedActivity event) {
        getHibernateTemplate().delete(event);
    }

    public List<PlannedActivity> getPlannedActivitiesForAcivity(Integer activityId) {

        return (List<PlannedActivity>) getHibernateTemplate().find("select pa from PlannedActivity as pa where pa.activity.id=?",activityId);
    }

   
}

@@ -484,24 +484,129 @@
 ass;%0A    %7D%0A%0A
+    /**%0A    * Deletes a planned activity%0A    *%0A    * @param  event the planned activity to delete%0A    */%0A
     @Transac
@@ -725,24 +725,233 @@
 nt);%0A    %7D%0A%0A
+    /**%0A    * Finds all planned activities for a activity id%0A    *%0A    * @param  activityId the activity id to search with%0A    * @return      a list of planned activities with the activity id passed in%0A    */%0A
     public L
@@ -1024,17 +1024,16 @@
 tyId) %7B%0A
-%0A
         
@@ -1171,16 +1171,11 @@
 );%0A    %7D
-%0A%0A   
 %0A%7D%0A

Add javadoc to planned activity dao.