Ignore:
Timestamp:
Mar 3, 2010, 12:50:40 PM (10 years ago)
Author:
keesvb
Message:

updated study/show to show multiple subject templates

File:
1 edited

Legend:

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

    r228 r229  
    5151
    5252        /**
     53         * Return the unique Subject templates that are used in this study
     54         */
     55        def Set<Template> giveSubjectTemplates() {
     56                TemplateEntity.giveTemplates(subjects);
     57        }
     58
     59
     60        /**
    5361         * Returns the template of all subjects in the study
    5462         * Throws an error if there are no or multiple subject templates
    5563         */
    56         def Template giveSubjectTemplate() {
    57                 TemplateEntity.giveTemplate(subjects);
    58         }
     64        // outcommented, we shouldn't make it too easy for ourselves by introducing uncertain assumptions (1 distinct template)
     65        //def Template giveSubjectTemplate() {
     66        //      TemplateEntity.giveTemplate(subjects);
     67        //}
    5968
    6069        /**
    61          * Returns the template of all samples in the study
    62          * Throws an error if there are no or multiple sample templates
     70         * Returns the unique Sample templates that are used in the study
    6371         */
    64         def Template giveSampleTemplate() {
    65                 TemplateEntity.giveTemplate(samples);
     72        def Template giveSampleTemplates() {
     73                TemplateEntity.giveTemplates(samples);
    6674        }
    6775        /**
Note: See TracChangeset for help on using the changeset viewer.