eu.etaxonomy.cdm.io.common.mapping
Class DbImportMultiAttributeMapperBase<CDMBASE extends CdmBase,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<CDMBASE,STATE>
All Implemented Interfaces:
IDbImportMapper<STATE,CDMBASE>
Direct Known Subclasses:
DbImportMediaMapper, DbImportMethodMapper, DbImportMultiLanguageTextMapper, DbImportNameTypeDesignationMapper, DbImportObjectCreationMapperBase, DbImportSynonymMapper, DbImportTaxIncludedInMapper

public abstract class DbImportMultiAttributeMapperBase<CDMBASE extends CdmBase,STATE extends DbImportStateBase<?,?>>
extends MultipleAttributeMapperBase<CdmSingleAttributeMapperBase>
implements IDbImportMapper<STATE,CDMBASE>

Version:
1.0
Author:
a.mueller

Field Summary
protected  DbImportMapperBase<STATE> importMapperHelper
           
 
Fields inherited from class eu.etaxonomy.cdm.io.common.mapping.MultipleAttributeMapperBase
singleMappers
 
Constructor Summary
DbImportMultiAttributeMapperBase()
           
 
Method Summary
protected  String getForeignKey(ResultSet rs, String fkAttribute)
           
protected  CdmBase getRelatedObject(ResultSet rs, String namespace, String fkAttribute)
          Retrieves a related object from the state's related object map.
protected  CdmBase getRelatedObject(String namespace, String foreignKey)
          Retrieves a related object from the state's related object map.
protected  STATE getState()
           
 void initialize(STATE state, Class<? extends CdmBase> destinationClass)
           
 
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
 
Methods inherited from interface eu.etaxonomy.cdm.io.common.mapping.IDbImportMapper
invoke
 

Field Detail

importMapperHelper

protected DbImportMapperBase<STATE extends DbImportStateBase<?,?>> importMapperHelper
Constructor Detail

DbImportMultiAttributeMapperBase

public DbImportMultiAttributeMapperBase()
Method Detail

initialize

public void initialize(STATE state,
                       Class<? extends CdmBase> destinationClass)
Specified by:
initialize in interface IDbImportMapper<STATE extends DbImportStateBase<?,?>,CDMBASE extends CdmBase>

getState

protected STATE getState()

getRelatedObject

protected CdmBase getRelatedObject(String namespace,
                                   String foreignKey)
Retrieves a related object from the state's related object map. Needs casting.

Parameters:
namespace -
foreignKey -
Returns:

getRelatedObject

protected CdmBase getRelatedObject(ResultSet rs,
                                   String namespace,
                                   String fkAttribute)
                            throws SQLException
Retrieves a related object from the state's related object map. Needs casting.

Parameters:
namespace -
foreignKey -
Returns:
Throws:
SQLException

getForeignKey

protected String getForeignKey(ResultSet rs,
                               String fkAttribute)
                        throws SQLException
Parameters:
rs -
dbReferenceFkAttribute2 -
Returns:
Throws:
SQLException


Copyright © 2007-2013 EDIT. All Rights Reserved.