Class AbstractIdMapper
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.restore.idmapping.AbstractIdMapper
-
- All Implemented Interfaces:
IdMapper
- Direct Known Subclasses:
SiteRestoreIdMapper
,SpaceRestoreIdMapper
public abstract class AbstractIdMapper extends Object implements IdMapper
Responsible for keeping id mappings between the xml ids and the database ids during restore. Also provides information about records saved to the database.- Since:
- 8.1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected PersistedObjectsRegister
persistedObjectsRegister
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractIdMapper(PersistedObjectsRegister persistedObjectsRegister)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<?>
fixContentEntityObjectClass(Class<?> clazz)
Collection<HibernateField>
getAllNotSatisfiedDependencies(ImportedObjectV2 importedObject)
boolean
isPersistedXmlId(Class<?> clazz, Object xmlId)
Check if the records with id from XML has been persisted.void
markObjectsAsPersisted(ExportableEntityInfo entityInfo, List<Object> databaseObjectIds)
Marks all ids as persisted.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.impl.backuprestore.restore.idmapping.IdMapper
getDatabaseId, prepareObjectsToBePersisted
-
-
-
-
Field Detail
-
persistedObjectsRegister
protected final PersistedObjectsRegister persistedObjectsRegister
-
-
Constructor Detail
-
AbstractIdMapper
protected AbstractIdMapper(PersistedObjectsRegister persistedObjectsRegister)
-
-
Method Detail
-
isPersistedXmlId
public boolean isPersistedXmlId(Class<?> clazz, Object xmlId)
Description copied from interface:IdMapper
Check if the records with id from XML has been persisted.- Specified by:
isPersistedXmlId
in interfaceIdMapper
-
markObjectsAsPersisted
public void markObjectsAsPersisted(ExportableEntityInfo entityInfo, List<Object> databaseObjectIds)
Description copied from interface:IdMapper
Marks all ids as persisted. This method is usually called when the transaction is committed.- Specified by:
markObjectsAsPersisted
in interfaceIdMapper
- Parameters:
entityInfo
- entity infodatabaseObjectIds
- database objects ids
-
getAllNotSatisfiedDependencies
public Collection<HibernateField> getAllNotSatisfiedDependencies(ImportedObjectV2 importedObject)
- Specified by:
getAllNotSatisfiedDependencies
in interfaceIdMapper
- Returns:
- all fields which referenced records are not persisted yet.
-
-