Class SiteRestoreIdMapper

  • All Implemented Interfaces:
    IdMapper

    public class SiteRestoreIdMapper
    extends AbstractIdMapper
    Responsible for keeping id mappings between the xml ids and the database ids during site restore. During site restore xml id is saved as database id, so we don't generate any new ids here and just return the same value.
    Since:
    8.1.0
    • Method Detail

      • getDatabaseId

        public Object getDatabaseId​(Class<?> clazz,
                                    Object xmlId)
        Description copied from interface: IdMapper
        Returns the database id related to the xml id or null if the database id was not generated before.
      • prepareObjectsToBePersisted

        public Collection<ImportedObjectV2> prepareObjectsToBePersisted​(ExportableEntityInfo entityInfo,
                                                                        Collection<ImportedObjectV2> importedObjects)
        Description copied from interface: IdMapper
        Prepares records to be inserted to the database. During space restore it will replace all ids with new one.
        Parameters:
        entityInfo - entity info of persisted objects
        importedObjects - Objects that should be persisted
        Returns:
        Returns objects which are ready to be persisted