eu.etaxonomy.cdm.io.common.mapping
Class DbImportObjectCreationMapperBase<CREATE extends VersionableEntity,STATE extends DbImportStateBase<?,?>>

java.lang.Object
  extended by eu.etaxonomy.cdm.io.common.mapping.CdmMapperBase
      extended by eu.etaxonomy.cdm.io.common.mapping.CdmAttributeMapperBase
          extended by eu.etaxonomy.cdm.io.common.mapping.MultipleAttributeMapperBase<CdmSingleAttributeMapperBase>
              extended by eu.etaxonomy.cdm.io.common.mapping.DbImportMultiAttributeMapperBase<CREATE,STATE>
                  extended by eu.etaxonomy.cdm.io.common.mapping.DbImportObjectCreationMapperBase<CREATE,STATE>
All Implemented Interfaces:
IDbImportMapper<STATE,CREATE>
Direct Known Subclasses:
DbImportDefinedTermCreationMapperBase, DbImportDescriptionElementCreationMapperBase, DbImportDescriptionElementSourceCreationMapper, DbImportObjectCreationMapper, DbImportSupplementCreationMapperBase

public abstract class DbImportObjectCreationMapperBase<CREATE extends VersionableEntity,STATE extends DbImportStateBase<?,?>>
extends DbImportMultiAttributeMapperBase<CREATE,STATE>

Version:
1.0
Author:
a.mueller

Field Summary
protected  String dbIdAttribute
           
protected  String objectToCreateNamespace
           
 
Fields inherited from class eu.etaxonomy.cdm.io.common.mapping.DbImportMultiAttributeMapperBase
importMapperHelper
 
Fields inherited from class eu.etaxonomy.cdm.io.common.mapping.MultipleAttributeMapperBase
singleMappers
 
Constructor Summary
protected DbImportObjectCreationMapperBase(String dbIdAttribute, String objectToCreateNamespace)
           
 
Method Summary
 void addOriginalSource(ResultSet rs, CREATE cdmBase)
          TODO also implemented in CdmImportBase (reduce redundance)
protected abstract  CREATE createObject(ResultSet rs)
          This method creates the object to be created.
protected abstract  CREATE doInvoke(ResultSet rs, CREATE createdObject)
           
protected  IInputTransformer getTransformer()
          Returns the transformer from the configuration
 CREATE invoke(ResultSet rs, CREATE noObject)
           
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.DbImportMultiAttributeMapperBase
getForeignKey, getRelatedObject, getRelatedObject, getState, initialize
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.MultipleAttributeMapperBase
getDestinationAttributeList, getDestinationAttributes, getSourceAttributeList, getSourceAttributes, getStringDbValue
 
Methods inherited from class eu.etaxonomy.cdm.io.common.mapping.CdmAttributeMapperBase
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dbIdAttribute

protected String dbIdAttribute

objectToCreateNamespace

protected String objectToCreateNamespace
Constructor Detail

DbImportObjectCreationMapperBase

protected DbImportObjectCreationMapperBase(String dbIdAttribute,
                                           String objectToCreateNamespace)
Parameters:
mappingImport -
Method Detail

invoke

public CREATE invoke(ResultSet rs,
                     CREATE noObject)
                                        throws SQLException
Throws:
SQLException

doInvoke

protected abstract CREATE doInvoke(ResultSet rs,
                                   CREATE createdObject)
                                                      throws SQLException
Parameters:
rs -
result -
Throws:
SQLException

createObject

protected abstract CREATE createObject(ResultSet rs)
                                                          throws SQLException
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.

Parameters:
rs - The result set
Returns:
The object to be created
Throws:
SQLException

addOriginalSource

public void addOriginalSource(ResultSet rs,
                              CREATE cdmBase)
                       throws SQLException
TODO also implemented in CdmImportBase (reduce redundance)

Throws:
SQLException

getTransformer

protected IInputTransformer getTransformer()
Returns the transformer from the configuration

Returns:


Copyright © 2007-2013 EDIT. All Rights Reserved.