Show
Ignore:
Timestamp:
08-02-10 12:42:46 (4 years ago)
Author:
keesvb
Message:

added first version of importer data model, added helper methods to domain class for getting all entity fields, added study template fields

Files:
1 modified

Legend:

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

    r162 r176  
    5353                } 
    5454        } 
     55 
     56        def setFieldValue(String fieldName, value) { 
     57                this.properties.each { println it} 
     58                if (this.properties.containsKey(fieldName)) { 
     59                        this[fieldName] = value 
     60                } 
     61                else if (templateStringFields.containsKey(fieldName) && value.class == String) { 
     62                        this.templateStringFields[fieldName] = value 
     63                } 
     64                else { 
     65                        println "Field ${fieldName} not found" 
     66                } 
     67        } 
    5568}