Class SequenceGeneratorCorruptionDetection

java.lang.Object
org.broadleafcommerce.common.persistence.SequenceGeneratorCorruptionDetection
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>

@Repository("blSequenceGeneratorCorruptionDetection") public class SequenceGeneratorCorruptionDetection extends Object implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Detect inconsistencies between the values in the SEQUENCE_GENERATOR and the primary keys of the managed tables.
Author:
Jeff Fischer
  • Field Details

    • targetModeMaps

      protected List<Map<String,Map<String,Object>>> targetModeMaps
    • persistenceService

      protected PersistenceService persistenceService
    • transUtil

      protected StreamingTransactionCapableUtil transUtil
    • detectSequenceGeneratorInconsistencies

      @Value("${detect.sequence.generator.inconsistencies}") protected boolean detectSequenceGeneratorInconsistencies
    • automaticallyCorrectInconsistencies

      @Value("${auto.correct.sequence.generator.inconsistencies}") protected boolean automaticallyCorrectInconsistencies
    • defaultSchemaSequenceGenerator

      @Value("${default.schema.sequence.generator}") protected String defaultSchemaSequenceGenerator
  • Constructor Details

    • SequenceGeneratorCorruptionDetection

      public SequenceGeneratorCorruptionDetection()
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
    • patchSequenceGeneratorInconsistencies

      protected void patchSequenceGeneratorInconsistencies(jakarta.persistence.EntityManager em, org.hibernate.Session session)