Project

General

Profile

Download (1.79 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.cdm.io.common.mapping.out;
11

    
12
import org.apache.log4j.Logger;
13

    
14
import eu.etaxonomy.cdm.io.common.DbExportStateBase;
15
import eu.etaxonomy.cdm.model.common.CdmBase;
16

    
17
/**
18
 * @author a.mueller
19
 * @since 12.05.2009
20
 * @version 1.0
21
 */
22
public class DbNullMapper extends DbSingleAttributeExportMapperBase<DbExportStateBase<?, IExportTransformer>> implements IDbExportMapper<DbExportStateBase<?, IExportTransformer>, IExportTransformer>{
23
	@SuppressWarnings("unused")
24
	private static final Logger logger = Logger.getLogger(DbNullMapper.class);
25
	private int sqlType;
26
	
27
	public static DbNullMapper NewInstance(String dbIdAttributeString, int sqlType){
28
		return new DbNullMapper(dbIdAttributeString, sqlType);
29
	}
30
	
31
	/**
32
	 * @param dbAttributString
33
	 * @param cdmAttributeString
34
	 */
35
	protected DbNullMapper(String dbAttributeString, int sqlType) {
36
		super(null, dbAttributeString, null);
37
		this.sqlType = sqlType;
38
	}
39

    
40

    
41
	/* (non-Javadoc)
42
	 * @see eu.etaxonomy.cdm.io.common.CdmSingleAttributeMapperBase#getTypeClass()
43
	 */
44
	@Override
45
	public Class<?> getTypeClass() {
46
		return Integer.class;
47
	}
48

    
49
	/* (non-Javadoc)
50
	 * @see eu.etaxonomy.cdm.io.berlinModel.out.mapper.DbSingleAttributeExportMapperBase#getValue()
51
	 */
52
	@Override
53
	protected Object getValue(CdmBase cdmBase) {
54
		return null;
55
	}
56
	
57
	
58

    
59
	/* (non-Javadoc)
60
	 * @see eu.etaxonomy.cdm.io.berlinModel.out.mapper.DbSingleAttributeExportMapperBase#getValueType()
61
	 */
62
	@Override
63
	protected int getSqlType() {
64
		return this.sqlType;
65
	}
66
	
67
}
(22-22/40)