Ignore:
Timestamp:
May 17, 2010, 3:26:48 PM (9 years ago)
Author:
keesvb
Message:

cleaned up BootStrap? and re-added Samples, updated study/show to also show sampling events in EventGroups?, added description field for Templates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/Study.groovy

    r408 r421  
    7070
    7171        /**
     72         * Return the unique Event and SamplingEvent templates that are used in this study
     73         */
     74        Set<Template> giveAllEventTemplates() {
     75                // For some reason, giveAllEventTemplates() + giveAllSamplingEventTemplates()
     76                // gives trouble when asking .size() to the result
     77                // So we also use giveTemplates here
     78                TemplateEntity.giveTemplates(events + samplingEvents);
     79        }
     80
     81
     82        /**
    7283         * Return the unique Event templates that are used in this study
    7384         */
    74         def Set<Template> giveEventTemplates() {
     85        Set<Template> giveEventTemplates() {
    7586                TemplateEntity.giveTemplates(events);
    7687        }
     
    7990         * Return the unique SamplingEvent templates that are used in this study
    8091         */
    81         def Set<Template> giveSamplingEventTemplates() {
    82                 TemplateEntity.giveTemplates(events);
     92        Set<Template> giveSamplingEventTemplates() {
     93                TemplateEntity.giveTemplates(samplingEvents);
    8394        }
    8495
     
    8697         * Returns the unique Sample templates that are used in the study
    8798         */
    88         def Template giveSampleTemplates() {
     99        Set<Template> giveSampleTemplates() {
    89100                TemplateEntity.giveTemplates(samples);
    90101        }
     
    92103         * Returns the template of the study
    93104         */
    94         def Template giveStudyTemplate() {
     105        Template giveStudyTemplate() {
    95106                return this.template;
    96107        }
Note: See TracChangeset for help on using the changeset viewer.