Class DatabaseIntegrityCheckerService

java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.databaseIntegrity.DatabaseIntegrityCheckerService
All Implemented Interfaces:
IDatabaseIntegrityChecker

public class DatabaseIntegrityCheckerService extends CayenneService implements IDatabaseIntegrityChecker
Provide a service to check tables for integrity issues(relations and indexes).
Since:
23.04.0
  • Field Details

    • DB_PRODUCT

      public static final String DB_PRODUCT
  • Constructor Details

    • DatabaseIntegrityCheckerService

      public DatabaseIntegrityCheckerService()
  • Method Details

    • getFetchLimit

      public int getFetchLimit()
      Return the fetch limit to limit the maximum number of records need to be processed.
      Returns:
      the fetch limit to limit the maximum number of records need to be processed
    • setFetchLimit

      public void setFetchLimit(int fetchLimit)
      Set the fetch limit to limit the maximum number of records need to be processed.
      Parameters:
      fetchLimit - the fetch limit to limit the maximum number of records need to be processed
    • getIndexFileName

      public static String getIndexFileName()
      Return index file name based on database.
      Returns:
      The index file name
    • getHistoryIndexFileName

      public static String getHistoryIndexFileName()
      Return transaction history index file name based on database.
      Returns:
      The transaction history index file name
    • checkRelations

      public List<String> checkRelations()
      check the database relations integrity and return all invalid records.
      Specified by:
      checkRelations in interface IDatabaseIntegrityChecker
      Returns:
      Invalid records
    • checkIndexes

      public List<String> checkIndexes()
      check the database Indexes integrity and return nonexistent indexes.
      Specified by:
      checkIndexes in interface IDatabaseIntegrityChecker
      Returns:
      Nonexistent Indexes