public abstract class DbImportBase<STATE extends DbImportStateBase<CONFIG,STATE>,CONFIG extends DbImportConfiguratorBase<STATE>> extends CdmImportBase<CONFIG,STATE> implements ICdmIO<STATE>, IPartitionedIO<STATE>
CdmImportBase.TermMatchMode
CREATE, IMAGE_GALLERY, READ_MEDIA_DATA, uuidUserDefinedAnnotationTypeVocabulary, uuidUserDefinedExtensionTypeVocabulary, uuidUserDefinedFeatureVocabulary, uuidUserDefinedIdentifierTypeVocabulary, uuidUserDefinedKindOfUnitVocabulary, uuidUserDefinedLanguageVocabulary, uuidUserDefinedMarkerTypeVocabulary, uuidUserDefinedMeasurementUnitVocabulary, uuidUserDefinedModifierVocabulary, uuidUserDefinedNamedAreaLevelVocabulary, uuidUserDefinedNamedAreaVocabulary, uuidUserDefinedNomenclaturalStatusTypeVocabulary, uuidUserDefinedPresenceAbsenceVocabulary, uuidUserDefinedRankVocabulary, uuidUserDefinedReferenceSystemVocabulary, uuidUserDefinedStateVocabulary, uuidUserDefinedStatisticalMeasureVocabulary, uuidUserDefinedTaxonRelationshipTypeVocabulary
INCLUDE_UNPUBLISHED, ioName, NO_UNPUBLISHED
applicationContext
FEATURE_STORE, NOMREF_STORE, REFERENCE_STORE, SPECIMEN_STORE, TAXON_STORE, TAXONNAME_STORE, TEAM_STORE
ID_LIST_TOKEN
Constructor and Description |
---|
DbImportBase(java.lang.String tableName,
java.lang.String pluralString) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkSqlServerColumnExists(Source source,
java.lang.String tableName,
java.lang.String columnName) |
protected boolean |
doId(STATE state,
ISourceable sourceable,
long id,
java.lang.String namespace) |
protected boolean |
doId(STATE state,
ISourceable sourceable,
java.lang.String id,
java.lang.String namespace) |
protected void |
doInvoke(STATE state)
invoke method to be implemented by implementing classes
|
protected void |
doLogPerLoop(int count,
int recordsPerLog,
java.lang.String pluralString) |
protected Annotation |
doNotes(AnnotatableEntity annotatableEntity,
java.lang.String notes)
Adds a note to the annotatable entity.
|
protected User |
getExistingUser(STATE state,
java.lang.String userString,
User user) |
protected abstract java.lang.String |
getIdQuery(STATE state) |
java.lang.String |
getPluralString() |
protected abstract java.lang.String |
getRecordQuery(CONFIG config) |
protected java.lang.String |
getTableName() |
protected User |
getUser(STATE state,
java.lang.String userString) |
protected java.util.Map<java.lang.String,java.lang.Object> |
getValueMap(java.sql.ResultSet rs)
Returns a map that holds all values of a ResultSet.
|
protected void |
handleForeignKey(java.sql.ResultSet rs,
java.util.Set<java.lang.String> idSet,
java.lang.String attributeName)
Reads a foreign key field from the result set and adds its value to the idSet.
|
protected boolean |
loopNeedsHandling(int i,
int recordsPerLoop)
Returns true if i is a multiple of recordsPerTransaction
|
protected boolean |
resultSetHasColumn(java.sql.ResultSet rs,
java.lang.String columnName) |
addOriginalSource, addOriginalSource, doubleFromString, fillMissingEpithets, fillMissingEpithetsForTaxa, getAcceptedTaxon, getAnnotationType, getByteArray, getDefaultResult, getDefaultTaxonDescription, getExtensionType, getExtensionType, getFeature, getFeature, getFeaturePlaceholder, getIdentiferType, getImageMedia, getImageMedia, getImageMedia, getKindOfUnit, getLanguage, getLanguage, getMarkedTaxonDescription, getMarkerType, getMarkerType, getMarkerType, getMarkerType, getMeasurementUnit, getModifier, getNamedArea, getNamedArea, getNamedArea, getNamedAreaLevel, getNoDataResult, getNomenclaturalStatusType, getPresenceTerm, getPresenceTerm, getRank, getReferenceSystem, getSpecimenDescription, getSpecimenDescription, getStateTerm, getStateTerm, getStatisticalMeasure, getTaxonDescription, getTaxonDescription, getTaxonNameDescription, getTaxonNameDescription, getTaxonRelationshipType, getVocabulary, intFromString, makeTree, makeTreeMemSave, NB, nullSafeBoolean, nullSafeDouble, nullSafeFloat, nullSafeInt, parseAuthorString, saveNameRelations
addObserver, addObservers, check, commitTransaction, countObservers, countSteps, doCheck, fire, fireProgressEvent, fireWarningEvent, fireWarningEvent, getInstance, getObservers, getSuccessString, invoke, isBlank, isIgnore, isNotBlank, removeObserver, removeObservers, rollbackTransaction, startTransaction, startTransaction, updateProgress, updateProgress, warnProgress
authenticate, clearSession, getAgentService, getAmplificationService, getAnnotationService, getAuthenticationManager, getBean, getClassificationService, getCollectionService, getCommonService, getDatabaseService, getDescriptionService, getDescriptiveDataSetService, getEntityConstraintViolationService, getEntityValidationService, getEventBaseService, getFeatureNodeService, getFeatureTreeService, getGrantedAuthorityService, getGroupService, getIdentificationKeyService, getLocationService, getLongRunningTasksService, getMediaService, getMetadataService, getNameService, getOccurrenceService, getPermissionEvaluator, getPolytomousKeyNodeService, getPolytomousKeyService, getPreferenceService, getPrimerService, getProgressMonitorService, getReferenceService, getRegistrationService, getRightsService, getSequenceService, getSession, getSessionFactory, getTaxonNodeService, getTaxonService, getTermNodeService, getTermService, getTermTreeService, getTransactionManager, getUserService, getVocabularyService, NewConversation, setApplicationContext, setDataSource, setSessionFactory, setTransactionManager
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
check, countSteps, fire, updateProgress, updateProgress, warnProgress
addObserver, addObservers, countObservers, getObservers, removeObserver, removeObservers
commitTransaction, doPartition, getReferenceService, getRelatedObjectsForPartition, startTransaction
invoke
public DbImportBase(java.lang.String tableName, java.lang.String pluralString)
protected void doInvoke(STATE state)
CdmIoBase
doInvoke
in class CdmIoBase<STATE extends DbImportStateBase<CONFIG,STATE>,ImportResult>
protected abstract java.lang.String getRecordQuery(CONFIG config)
protected abstract java.lang.String getIdQuery(STATE state)
protected java.lang.String getTableName()
public java.lang.String getPluralString()
getPluralString
in interface IPartitionedIO<STATE extends DbImportStateBase<CONFIG,STATE>>
protected boolean doId(STATE state, ISourceable sourceable, long id, java.lang.String namespace)
state
- sourceable
- id
- namespace
- protected boolean doId(STATE state, ISourceable sourceable, java.lang.String id, java.lang.String namespace)
state
- sourceable
- id
- namespace
- protected Annotation doNotes(AnnotatableEntity annotatableEntity, java.lang.String notes)
null
or notes is empty or null
.annotatableEntity
- notes
- protected User getExistingUser(STATE state, java.lang.String userString, User user)
state
- userString
- user
- protected boolean resultSetHasColumn(java.sql.ResultSet rs, java.lang.String columnName)
protected boolean checkSqlServerColumnExists(Source source, java.lang.String tableName, java.lang.String columnName)
protected java.util.Map<java.lang.String,java.lang.Object> getValueMap(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- java.sql.SQLException
protected void handleForeignKey(java.sql.ResultSet rs, java.util.Set<java.lang.String> idSet, java.lang.String attributeName) throws java.sql.SQLException
rs
- teamIdSet
- java.sql.SQLException
protected boolean loopNeedsHandling(int i, int recordsPerLoop)
i
- recordsPerTransaction
- protected void doLogPerLoop(int count, int recordsPerLog, java.lang.String pluralString)
Copyright © 2007-2020 EDIT. All Rights Reserved.