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 Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected booleanprotected PersistenceServiceprotected StreamingTransactionCapableUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) protected voidpatchSequenceGeneratorInconsistencies(jakarta.persistence.EntityManager em, org.hibernate.Session session) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Field Details
-
targetModeMaps
-
persistenceService
-
transUtil
-
detectSequenceGeneratorInconsistencies
@Value("${detect.sequence.generator.inconsistencies}") protected boolean detectSequenceGeneratorInconsistencies -
automaticallyCorrectInconsistencies
@Value("${auto.correct.sequence.generator.inconsistencies}") protected boolean automaticallyCorrectInconsistencies -
defaultSchemaSequenceGenerator
-
-
Constructor Details
-
SequenceGeneratorCorruptionDetection
public SequenceGeneratorCorruptionDetection()
-
-
Method Details
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
patchSequenceGeneratorInconsistencies
protected void patchSequenceGeneratorInconsistencies(jakarta.persistence.EntityManager em, org.hibernate.Session session)
-