source: trunk/grails-app/domain/dbnp/importer/MappingColumn.groovy

Last change on this file was 1530, checked in by t.w.abma@…, 8 years ago
  • added belongsTo relation to import mapping domain
  • Property svn:keywords set to Rev Author Date
File size: 1.1 KB
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        String name
16        TemplateFieldType templatefieldtype
17        Class entityclass
18        String property
19        Integer index
20        String value
21        Boolean identifier
22        Boolean dontimport
23
24    static belongsTo = [importmapping:ImportMapping]
25
26    //static transients = [ "templatefieldtype", "entity" ]
27
28    static constraints = {
29            //name(unique: true)
30        templatefieldtype(nullable:true)
31        identifier(default:false)
32            dontimport(default:false)
33        value(nullable:true)
34    }
35
36    static mapping = {
37            tablePerHierarchy false
38    }
39
40    String toString() {
41        return "Name:" + name + "/TemplateFieldType:" + templatefieldtype + "/Entity:" + entityclass + "/Property:" + property + "/Index:" + index + "/Value:" + value + "/Identifier:" + identifier
42    }
43}
Note: See TracBrowser for help on using the repository browser.