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 boolean
protected String
protected boolean
protected PersistenceService
protected StreamingTransactionCapableUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onApplicationEvent
(org.springframework.context.event.ContextRefreshedEvent event) protected void
patchSequenceGeneratorInconsistencies
(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, wait
Methods 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:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
patchSequenceGeneratorInconsistencies
protected void patchSequenceGeneratorInconsistencies(jakarta.persistence.EntityManager em, org.hibernate.Session session)
-