Ignore:
Timestamp:
Feb 8, 2010, 12:42:46 PM (12 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

File:
1 edited

Legend:

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

    r162 r176  
    4545                return title;
    4646        }
     47
     48        Map giveAllFields() {
     49                def result = [:]
     50
     51                // Using reflection here gives way too many properties, like searchable, hasMany,
     52                // and it will probably extend when we use new plugins
     53                // It is probably best
     54                // - to either hardcode the above given properties
     55                // - or to move all fields to the template
     56               
     57                this.properties.each{ //public fields only
     58                        println it.name
     59                        result[it.name] = it.type.name //name of field and name of type
     60                }
     61
     62                return result;
     63        }
    4764}
Note: See TracChangeset for help on using the changeset viewer.