1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
|
11
|
package eu.etaxonomy.cdm.io.berlinModel.out.mapper;
|
12
|
|
13
|
import java.sql.SQLException;
|
14
|
|
15
|
import org.apache.log4j.Logger;
|
16
|
import org.hsqldb.Types;
|
17
|
|
18
|
import eu.etaxonomy.cdm.io.berlinModel.out.DbExportState;
|
19
|
import eu.etaxonomy.cdm.io.berlinModel.out.BerlinModelExportConfigurator.IdType;
|
20
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
21
|
|
22
|
/**
|
23
|
* @author a.mueller
|
24
|
* @created 12.05.2009
|
25
|
* @version 1.0
|
26
|
*/
|
27
|
public class DbNullMapper extends DbSingleAttributeExportMapperBase<DbExportState<?>> implements IDbExportMapper<DbExportState<?>>{
|
28
|
@SuppressWarnings("unused")
|
29
|
private static final Logger logger = Logger.getLogger(DbNullMapper.class);
|
30
|
private int sqlType;
|
31
|
|
32
|
public static DbNullMapper NewInstance(String dbIdAttributeString, int sqlType){
|
33
|
return new DbNullMapper(dbIdAttributeString, sqlType);
|
34
|
}
|
35
|
|
36
|
/**
|
37
|
* @param dbAttributString
|
38
|
* @param cdmAttributeString
|
39
|
*/
|
40
|
protected DbNullMapper(String dbAttributeString, int sqlType) {
|
41
|
super(null, dbAttributeString, null);
|
42
|
this.sqlType = sqlType;
|
43
|
}
|
44
|
|
45
|
|
46
|
/* (non-Javadoc)
|
47
|
* @see eu.etaxonomy.cdm.io.common.CdmSingleAttributeMapperBase#getTypeClass()
|
48
|
*/
|
49
|
@Override
|
50
|
public Class<?> getTypeClass() {
|
51
|
return Integer.class;
|
52
|
}
|
53
|
|
54
|
/* (non-Javadoc)
|
55
|
* @see eu.etaxonomy.cdm.io.berlinModel.out.mapper.DbSingleAttributeExportMapperBase#getValue()
|
56
|
*/
|
57
|
@Override
|
58
|
protected Object getValue(CdmBase cdmBase) {
|
59
|
return null;
|
60
|
}
|
61
|
|
62
|
|
63
|
|
64
|
/* (non-Javadoc)
|
65
|
* @see eu.etaxonomy.cdm.io.berlinModel.out.mapper.DbSingleAttributeExportMapperBase#getValueType()
|
66
|
*/
|
67
|
@Override
|
68
|
protected int getSqlType() {
|
69
|
return this.sqlType;
|
70
|
}
|
71
|
|
72
|
}
|