java.lang.Object
com.atlassian.confluence.impl.backuprestore.restore.dao.RestoreDao

public class RestoreDao extends Object
Allows to perform all DB operations required for space and site restore.
Since:
7.20.0
  • Field Details

    • transactionManager

      protected final org.springframework.transaction.PlatformTransactionManager transactionManager
    • jdbcTemplateSupplier

      protected final Supplier<org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate> jdbcTemplateSupplier
  • Constructor Details

    • RestoreDao

      public RestoreDao(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager)
    • RestoreDao

      public RestoreDao(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager, Supplier<org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate> jdbcTemplateSupplier)
  • Method Details

    • setNextHiValue

      public int setNextHiValue(long nextHi)
    • getNextHiValue

      public Long getNextHiValue()
    • generateIds

      public Collection<Serializable> generateIds(org.hibernate.id.IdentifierGenerator identifierGenerator, Object fakeObject, int count)
      Generates multiple ids. Currently, it still generates ids one by one, but the implementation can be replaced in the future.
    • insertRecordsInTransaction

      public Collection<ImportedObjectV2> insertRecordsInTransaction(Collection<RestoreDao.RecordsForBatchInsert> recordsForBatchInserts)
      Inserts records for different tables in one transaction.
      Returns:
      persisted objects
    • runNativeQueryInTransaction

      public List<DbRawObjectData> runNativeQueryInTransaction(String query, Map<String,?> paramMap, int limit)
    • runNativeUpdateQuery

      public int runNativeUpdateQuery(String query, Map<String,?> paramMap)
    • doInTransaction

      public <T> T doInTransaction(org.springframework.transaction.support.TransactionCallback<T> callback)
    • doInReadOnlyTransaction

      public <T> T doInReadOnlyTransaction(org.springframework.transaction.support.TransactionCallback<T> callback)