eu.etaxonomy.cdm.io.common.mapping
Class DbImportMarkerCreationMapper
java.lang.Object
eu.etaxonomy.cdm.io.common.mapping.CdmMapperBase
eu.etaxonomy.cdm.io.common.mapping.CdmAttributeMapperBase
eu.etaxonomy.cdm.io.common.mapping.MultipleAttributeMapperBase<CdmSingleAttributeMapperBase>
eu.etaxonomy.cdm.io.common.mapping.DbImportMultiAttributeMapperBase<CREATE,STATE>
eu.etaxonomy.cdm.io.common.mapping.DbImportObjectCreationMapperBase<SUPPLEMENT,STATE>
eu.etaxonomy.cdm.io.common.mapping.DbImportSupplementCreationMapperBase<Marker,AnnotatableEntity,DbImportStateBase<?,?>,MarkerType>
eu.etaxonomy.cdm.io.common.mapping.DbImportMarkerCreationMapper
- All Implemented Interfaces:
- IDbImportMapper<DbImportStateBase<?,?>,Marker>
public class DbImportMarkerCreationMapper
- extends DbImportSupplementCreationMapperBase<Marker,AnnotatableEntity,DbImportStateBase<?,?>,MarkerType>
Object creation mapper which creates a marker.
- Version:
- 1.0
- Author:
- a.mueller
DbImportMarkerCreationMapper
protected DbImportMarkerCreationMapper(String dbSupplementedObjectAttribute,
String supplementedObjectNamespace,
String dbSupplementValueAttribute,
String dbIdAttribute,
MarkerType supplementType)
- Parameters:
dbSupplementValueAttribute - dbSupplementedObjectAttribute - dbIdAttribute - supplementedObjectNamespace - supplementType -
NewInstance
public static DbImportMarkerCreationMapper NewInstance(String dbMarkedObjectAttribute,
String markedObjectNamespace)
- Creates a marker mapper which creates an empty marker.
- Parameters:
dbMarkedObjectAttribute - markedObjectNamespace -
- Returns:
NewInstance
public static DbImportMarkerCreationMapper NewInstance(String dbMarkedObjectAttribute,
String markedObjectNamespace,
String dbMarkerValueAttribute,
String dbIdAttribute,
MarkerType markerType)
- Creates a marker mapper which creates a marker and sets the marker flag and the marker type and adds
an Annotation holding the original source id
- Parameters:
dbMarkedObjectAttribute - markedObjectNamespace - dbMarkerValueAttribute - dbIdAttribute - markerType -
- Returns:
addSupplement
protected boolean addSupplement(Marker marker,
AnnotatableEntity annotatableEntity,
String id)
- Description copied from class:
DbImportSupplementCreationMapperBase
- Adds the supplement to the supplementable entity. Returns falls if supplementable entity is
null
- Specified by:
addSupplement in class DbImportSupplementCreationMapperBase<Marker,AnnotatableEntity,DbImportStateBase<?,?>,MarkerType>
- Parameters:
marker - the supplement (e.g. an instance of class Extension)annotatableEntity - the supplementable entity (e.g. an IdentifiableEntity in case of a
supplement of type Extensionid - the supplementableEntity original source id (needed for verbose logging)
setSupplementValue
protected void setSupplementValue(ResultSet rs,
Marker marker)
throws SQLException
- Specified by:
setSupplementValue in class DbImportSupplementCreationMapperBase<Marker,AnnotatableEntity,DbImportStateBase<?,?>,MarkerType>
- Throws:
SQLException
createObject
protected Marker createObject(ResultSet rs)
throws SQLException
- Description copied from class:
DbImportObjectCreationMapperBase
- This method creates the object to be created. It needs to be implemented by the concrete classes.
E.g. if you have a TaxonNameCreation class which inherits from this class you need to implement
createObject by creating an empty taxon name.
- Specified by:
createObject in class DbImportObjectCreationMapperBase<Marker,DbImportStateBase<?,?>>
- Parameters:
rs - The result set
- Returns:
- The object to be created
- Throws:
SQLException
Copyright © 2007-2013 EDIT. All Rights Reserved.