org.broadleafcommerce.common.persistence
Class SequenceGeneratorCorruptionDetection

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

@Repository(value="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
protected  boolean automaticallyCorrectInconsistencies
           
protected  String defaultSchemaSequenceGenerator
           
protected  boolean detectSequenceGeneratorInconsistencies
           
protected  javax.persistence.EntityManager em
           
 
Constructor Summary
SequenceGeneratorCorruptionDetection()
           
 
Method Summary
 void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

em

protected javax.persistence.EntityManager em

detectSequenceGeneratorInconsistencies

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

automaticallyCorrectInconsistencies

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

defaultSchemaSequenceGenerator

@Value(value="${default.schema.sequence.generator}")
protected String defaultSchemaSequenceGenerator
Constructor Detail

SequenceGeneratorCorruptionDetection

public SequenceGeneratorCorruptionDetection()
Method Detail

onApplicationEvent

@Transactional(value="blTransactionManager")
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>


Copyright © 2013. All Rights Reserved.