eu.etaxonomy.cdm.io.common
Class DbImportStateBase<CONFIG extends DbImportConfiguratorBase,STATE extends DbImportStateBase>

java.lang.Object
  extended by eu.etaxonomy.cdm.io.common.IoStateBase<CONFIG,IO>
      extended by eu.etaxonomy.cdm.io.common.ImportStateBase<CONFIG,CdmImportBase>
          extended by eu.etaxonomy.cdm.io.common.DbImportStateBase<CONFIG,STATE>
All Implemented Interfaces:
IPartitionedState
Direct Known Subclasses:
BerlinModelImportState

public abstract class DbImportStateBase<CONFIG extends DbImportConfiguratorBase,STATE extends DbImportStateBase>
extends ImportStateBase<CONFIG,CdmImportBase>
implements IPartitionedState

Version:
1.0
Author:
a.mueller

Field Summary
static String CURRENT_OBJECT_ID
           
static String CURRENT_OBJECT_NAMESPACE
           
 
Fields inherited from class eu.etaxonomy.cdm.io.common.ImportStateBase
service, stores
 
Constructor Summary
protected DbImportStateBase(CONFIG config)
           
 
Method Summary
 void addRelatedObject(Object namespace, String id, CdmBase relatedObject)
           
 CdmBase getRelatedObject(Object namespace, String id)
          Returns a related object defined by the namespace and the id.
<T extends CdmBase>
T
getRelatedObject(Object namespace, String id, Class<T> clazz)
           
 Reference getTransactionalSourceReference()
          Stores the source reference for the time of a transaction.
 User getUser(String username)
           
 void makeTransactionalSourceReference(IReferenceService service)
           
 void putUser(String username, User user)
           
 void resetTransactionalSourceReference()
           
 void setRelatedObjects(Map<Object,Map<String,CdmBase>> relatedObjects)
          Sets the related objects map.
 
Methods inherited from class eu.etaxonomy.cdm.io.common.ImportStateBase
countTrees, countTreeUuids, getAnnotationType, getExtensionType, getFeature, getLanguage, getMarkerType, getMeasurementUnit, getModifier, getNamedArea, getNamedAreaLevel, getPresenceTerm, getRank, getReferenceSystem, getStateTerm, getStatisticalMeasure, getStore, getStores, getTaxonRelationshipType, getTransformer, getTree, getTreeUuid, getTreeUuidByIntTreeKey, getTreeUuidByTreeKey, isCheck, putAnnotationType, putClassificationUuid, putClassificationUuidInt, putExtensionType, putFeature, putLanguage, putMarkerType, putMeasurementUnit, putModifier, putNamedArea, putNamedAreaLevel, putPresenceTerm, putRank, putReferenceSystem, putStateTerm, putStatisticalMeasure, putTaxonRelationshipType, putTree, putTreeUuid, setCheck, setStores, setTransformer
 
Methods inherited from class eu.etaxonomy.cdm.io.common.IoStateBase
getConfig, getCurrentIO, initialize, isSuccess, setConfig, setCurrentIO, setSuccess, setUnsuccessfull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_OBJECT_NAMESPACE

public static final String CURRENT_OBJECT_NAMESPACE
See Also:
Constant Field Values

CURRENT_OBJECT_ID

public static final String CURRENT_OBJECT_ID
See Also:
Constant Field Values
Constructor Detail

DbImportStateBase

protected DbImportStateBase(CONFIG config)
Parameters:
config -
Method Detail

addRelatedObject

public void addRelatedObject(Object namespace,
                             String id,
                             CdmBase relatedObject)
Specified by:
addRelatedObject in interface IPartitionedState

getRelatedObject

public CdmBase getRelatedObject(Object namespace,
                                String id)
Description copied from interface: IPartitionedState
Returns a related object defined by the namespace and the id. The related objects are computed in IPartitionedIO.getRelatedObjectsForPartition(ResultSet)

Specified by:
getRelatedObject in interface IPartitionedState
Returns:

getRelatedObject

public <T extends CdmBase> T getRelatedObject(Object namespace,
                                              String id,
                                              Class<T> clazz)

setRelatedObjects

public void setRelatedObjects(Map<Object,Map<String,CdmBase>> relatedObjects)
Description copied from interface: IPartitionedState
Sets the related objects map. This usually does not need to be handled by the user but is called by the result set partitioner

Specified by:
setRelatedObjects in interface IPartitionedState

getTransactionalSourceReference

public Reference getTransactionalSourceReference()
Stores the source reference for the time of a transaction. Needs to be deleted manually after transaction finishes to avoid memory leaks.

Specified by:
getTransactionalSourceReference in interface IPartitionedState
Returns:

resetTransactionalSourceReference

public void resetTransactionalSourceReference()
Specified by:
resetTransactionalSourceReference in interface IPartitionedState

makeTransactionalSourceReference

public void makeTransactionalSourceReference(IReferenceService service)
Specified by:
makeTransactionalSourceReference in interface IPartitionedState

getUser

public User getUser(String username)

putUser

public void putUser(String username,
                    User user)


Copyright © 2007-2013 EDIT. All Rights Reserved.