package edu.northwestern.bioinformatics.studycalendar.dao;

import edu.northwestern.bioinformatics.studycalendar.domain.Source;

import java.util.List;

public class SourceDao extends StudyCalendarMutableDomainObjectDao<Source> {
    public Class<Source> domainClass() {
        return Source.class;
    }

    public List<Source> getAll()  {
        return getHibernateTemplate().find("from Source order by name");
    }

    public Source getByName(String name) {
        List<Source> sources = getHibernateTemplate().find("from Source where name = ?", name);
        if (!sources.isEmpty()) {
            return sources.get(0);
        }
        return null; 
    }
}

@@ -308,119 +308,498 @@
     
-public List%3CSource%3E getAll()  %7B%0A        return getHibernateTemplate().find(%22from Source order by name%22);%0A    %7D%0A
+/**%0A     * Finds all the activity sources available%0A     *%0A     * @return      a list of all the available activity sources%0A     */%0A    public List%3CSource%3E getAll()  %7B%0A        return getHibernateTemplate().find(%22from Source order by name%22);%0A    %7D%0A%0A    /**%0A     * Finds all the actiivty sources for the given activity source name%0A     *%0A     * @param  name the name of the activity source to search for%0A     * @return      the source that was found for the given activity source name%0A     */
 %0A   

Add javadoc to source dao.