- Timestamp:
- Mar 24, 2010, 5:30:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy
r299 r313 11 11 * $Date$ 12 12 */ 13 class TemplateEntity implements Serializable {13 abstract class TemplateEntity implements Serializable { 14 14 15 15 Template template … … 64 64 case TemplateFieldType.ONTOLOGYTERM: 65 65 return templateTermFields 66 default:66 default: 67 67 throw new NoSuchFieldException("Field type ${fieldType} not recognized") 68 68 } … … 139 139 } 140 140 141 142 /** 143 * Return all templated fields defined in the underlying template of this entity 144 */ 141 145 def Set<TemplateField> giveFields() { 142 146 return this.template.fields; 143 147 } 144 148 149 /** 150 * Return all relevant 'built-in' domain fields of the super class 151 * @return key-value pairs describing the built-in fields, with the names as keys and type (as TemplateFieldType) as values 152 */ 153 def giveDomainFields() { 154 def fieldSet = [:]; 155 if (super.hasProperty('name')) { 156 fieldSet['name'] = TemplateFieldType.STRING; 157 } 158 return fieldSet; 159 } 145 160 146 161 // See revision 237 for ideas about initializing the different templateField Maps
Note: See TracChangeset
for help on using the changeset viewer.