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

Last change on this file was 1530, checked in by t.w.abma@…, 10 years ago
  • added belongsTo relation to import mapping domain
  • Property svn:keywords set to Rev Author Date
File size: 1.1 KB
RevLine 
[185]1package dbnp.importer
2
[1456]3import org.dbnp.gdt.TemplateFieldType
[1426]4
[245]5/**
[534]6* name: column name (in Excel)
7* templatefieldtype: GSCF field type
[245]8* entity: GSCF entity class
[273]9* property: GSCF template field
[245]10* index: column index
11* value: column value (optional, normally only name is used)
[273]12* identifier: true if this column is identifying (unique/primary key)
[245]13*/
[1277]14class MappingColumn implements Serializable {
[185]15        String name
[1456]16        TemplateFieldType templatefieldtype
[1527]17        Class entityclass
[534]18        String property
[245]19        Integer index
20        String value
[273]21        Boolean identifier
[669]22        Boolean dontimport
[185]23
[1530]24    static belongsTo = [importmapping:ImportMapping]
25
[1529]26    //static transients = [ "templatefieldtype", "entity" ]
[1103]27
[185]28    static constraints = {
[1525]29            //name(unique: true)
[1530]30        templatefieldtype(nullable:true)
31        identifier(default:false)
[669]32            dontimport(default:false)
[1525]33        value(nullable:true)
[185]34    }
[245]35
[936]36    static mapping = {
37            tablePerHierarchy false
38    }
39
[245]40    String toString() {
[1527]41        return "Name:" + name + "/TemplateFieldType:" + templatefieldtype + "/Entity:" + entityclass + "/Property:" + property + "/Index:" + index + "/Value:" + value + "/Identifier:" + identifier
[245]42    }
[185]43}
Note: See TracBrowser for help on using the repository browser.