Revision f19a4363
Added by Andreas Müller almost 5 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/mapping/out/DbTextDataMapper.java | ||
---|---|---|
23 | 23 |
* Maps text data to a database string field. (Only handles one language) |
24 | 24 |
* @author a.mueller |
25 | 25 |
* @since 06.02.2012 |
26 |
* @version 1.0 |
|
27 | 26 |
*/ |
28 | 27 |
public class DbTextDataMapper extends DbSingleAttributeExportMapperBase<DbExportStateBase<?, IExportTransformer>> implements IDbExportMapper<DbExportStateBase<?, IExportTransformer>, IExportTransformer>{ |
29 | 28 |
@SuppressWarnings("unused") |
... | ... | |
51 | 50 |
this.language = language; |
52 | 51 |
} |
53 | 52 |
|
54 |
/* (non-Javadoc) |
|
55 |
* @see eu.etaxonomy.cdm.io.berlinModel.out.mapper.DbSingleAttributeExportMapperBase#getValue(eu.etaxonomy.cdm.model.common.CdmBase) |
|
56 |
*/ |
|
57 | 53 |
@Override |
58 | 54 |
protected Object getValue(CdmBase cdmBase) { |
59 | 55 |
if (cdmBase.isInstanceOf(TextData.class)){ |
... | ... | |
69 | 65 |
} |
70 | 66 |
} |
71 | 67 |
|
72 |
/* (non-Javadoc) |
|
73 |
* @see eu.etaxonomy.cdm.io.berlinModel.out.mapper.DbSingleAttributeExportMapperBase#getValueType() |
|
74 |
*/ |
|
75 | 68 |
@Override |
76 | 69 |
protected int getSqlType() { |
77 | 70 |
return Types.VARCHAR; |
78 | 71 |
} |
79 | 72 |
|
80 |
|
|
81 |
/* (non-Javadoc) |
|
82 |
* @see eu.etaxonomy.cdm.io.common.CdmSingleAttributeMapperBase#getTypeClass() |
|
83 |
*/ |
|
84 | 73 |
@Override |
85 | 74 |
public Class<?> getTypeClass() { |
86 | 75 |
return String.class; |
Also available in: Unified diff
cleanup