eu.etaxonomy.cdm.io.common.mapping
Class DbImportAnnotationMapper
java.lang.Object
eu.etaxonomy.cdm.io.common.mapping.CdmMapperBase
eu.etaxonomy.cdm.io.common.mapping.CdmAttributeMapperBase
eu.etaxonomy.cdm.io.common.mapping.CdmSingleAttributeMapperBase
eu.etaxonomy.cdm.io.common.mapping.DbSingleAttributeImportMapperBase<DbImportStateBase<?,?>,AnnotatableEntity>
eu.etaxonomy.cdm.io.common.mapping.DbImportAnnotationMapper
- All Implemented Interfaces:
- IDbImportMapper<DbImportStateBase<?,?>,AnnotatableEntity>
public class DbImportAnnotationMapper
- extends DbSingleAttributeImportMapperBase<DbImportStateBase<?,?>,AnnotatableEntity>
- implements IDbImportMapper<DbImportStateBase<?,?>,AnnotatableEntity>
This class maps a database attribute to CDM annotation added to the target class
TODO maybe this class should not inherit from DbSingleAttributeImportMapperBase
as it does not map to a single attribute
- Version:
- 1.0
- Author:
- a.mueller
|
Method Summary |
protected AnnotatableEntity |
doInvoke(AnnotatableEntity annotatableEntity,
Object dbValue)
|
protected AnnotationType |
getAnnotationType(CdmImportBase<?,?> currentImport,
UUID uuid,
String label,
String text,
String labelAbbrev)
|
Class<String> |
getTypeClass()
|
void |
initialize(DbImportStateBase<?,?> state,
Class<? extends CdmBase> destinationClass)
|
AnnotatableEntity |
invoke(ResultSet rs,
AnnotatableEntity annotatableEntity)
|
static DbImportAnnotationMapper |
NewInstance(String dbAttributeString,
AnnotationType annotationType)
|
static DbImportAnnotationMapper |
NewInstance(String dbAttributeString,
AnnotationType annotationType,
Language language)
|
static DbImportAnnotationMapper |
NewInstance(String dbAttributeString,
UUID uuid,
String label,
String text,
String labelAbbrev)
FIXME Warning: the annotation type creation is not yet implemented |
static DbImportAnnotationMapper |
NewInstance(String dbAttributeString,
UUID uuid,
String label,
String text,
String labelAbbrev,
Language language)
* FIXME Warning: the annotation type creation is not yet implemented |
NewInstance
public static DbImportAnnotationMapper NewInstance(String dbAttributeString,
UUID uuid,
String label,
String text,
String labelAbbrev)
- FIXME Warning: the annotation type creation is not yet implemented
- Parameters:
dbAttributeString - uuid - label - text - labelAbbrev -
- Returns:
NewInstance
public static DbImportAnnotationMapper NewInstance(String dbAttributeString,
UUID uuid,
String label,
String text,
String labelAbbrev,
Language language)
- * FIXME Warning: the annotation type creation is not yet implemented
- Parameters:
dbAttributeString - uuid - label - text - labelAbbrev -
- Returns:
NewInstance
public static DbImportAnnotationMapper NewInstance(String dbAttributeString,
AnnotationType annotationType)
- Parameters:
dbAttributeString - annotationType -
- Returns:
NewInstance
public static DbImportAnnotationMapper NewInstance(String dbAttributeString,
AnnotationType annotationType,
Language language)
- Parameters:
dbAttributeString - annotationType - language -
- Returns:
initialize
public void initialize(DbImportStateBase<?,?> state,
Class<? extends CdmBase> destinationClass)
- Specified by:
initialize in interface IDbImportMapper<DbImportStateBase<?,?>,AnnotatableEntity>- Overrides:
initialize in class DbSingleAttributeImportMapperBase<DbImportStateBase<?,?>,AnnotatableEntity>
invoke
public AnnotatableEntity invoke(ResultSet rs,
AnnotatableEntity annotatableEntity)
throws SQLException
- Specified by:
invoke in interface IDbImportMapper<DbImportStateBase<?,?>,AnnotatableEntity>- Overrides:
invoke in class DbSingleAttributeImportMapperBase<DbImportStateBase<?,?>,AnnotatableEntity>
- Throws:
SQLException
doInvoke
protected AnnotatableEntity doInvoke(AnnotatableEntity annotatableEntity,
Object dbValue)
- Overrides:
doInvoke in class DbSingleAttributeImportMapperBase<DbImportStateBase<?,?>,AnnotatableEntity>
getAnnotationType
protected AnnotationType getAnnotationType(CdmImportBase<?,?> currentImport,
UUID uuid,
String label,
String text,
String labelAbbrev)
- Parameters:
service - uuid - label - text - labelAbbrev -
- Returns:
getTypeClass
public Class<String> getTypeClass()
- Specified by:
getTypeClass in class CdmSingleAttributeMapperBase
Copyright © 2007-2013 EDIT. All Rights Reserved.