Class DatabasePersister

  • All Implemented Interfaces:
    Persister

    public class DatabasePersister
    extends Object
    implements Persister
    Stores prepared imported objects in the database. THe class receives a batch with mapping between entity infos to the imported objects, then updates ids using idMapper and stores all objects in the database in a single transaction.
    Since:
    7.20.0
    • Constructor Detail

      • DatabasePersister

        public DatabasePersister​(RestoreDao restoreDao,
                                 EntityInfoSqlHelper entityInfoSqlHelper,
                                 IdMapper idMapper,
                                 OnObjectsProcessingHandler onObjectsProcessingHandler)
        Parameters:
        restoreDao - dao that is responsible for persisting objects. All methods are transactional
        entityInfoSqlHelper - helps generating SQL code
        idMapper - id mapper is required to replace XML IDs with DB IDs
        onObjectsProcessingHandler - is called when objects are persisted/skipped/etc