root/trunk/grails-app/domain/dbnp/importer/MappingColumn.groovy @ 1525

Revision 1525, 1.0 KB (checked in by t.w.abma@…, 3 years ago)

- Importer tests on hold due to missing parse() method in Template domain
- ImportMappings? and MappingColumns? are now persisted and can be loaded, todo: null-entities? and lazy loading issue

  • Property svn:keywords set to Rev Author Date
Line 
1package dbnp.importer
2
3import org.dbnp.gdt.TemplateFieldType
4
5/**
6* name: column name (in Excel)
7* templatefieldtype: GSCF field type
8* entity: GSCF entity class
9* property: GSCF template field
10* index: column index
11* value: column value (optional, normally only name is used)
12* identifier: true if this column is identifying (unique/primary key)
13*/
14class MappingColumn implements Serializable {
15
16        String name
17        TemplateFieldType templatefieldtype
18        Class entity
19        String property
20        Integer index
21        String value
22        Boolean identifier
23        Boolean dontimport
24
25    static transients = [ "templatefieldtype", "entity" ]   
26
27    static constraints = {
28            //name(unique: true)
29            dontimport(default:false)
30        value(nullable:true)
31    }
32
33    static mapping = {
34            tablePerHierarchy false
35    }
36
37    String toString() {
38        return "Name:" + name + "/TemplateFieldType:" + templatefieldtype + "/Entity:" + entity + "/Property:" + property + "/Index:" + index + "/Value:" + value + "/Identifier:" + identifier
39    }
40}
Note: See TracBrowser for help on using the browser.