Class DeleteStatementGeneratorImpl

java.lang.Object
org.broadleafcommerce.core.util.service.DeleteStatementGeneratorImpl
All Implemented Interfaces:
DeleteStatementGenerator

@Service("blDeleteStatementGenerator") public class DeleteStatementGeneratorImpl extends Object implements DeleteStatementGenerator
The idea of this class if to iterate over props of the passed class and if found prop with annotation @OneToMany recurse into it. In this way we build paths to the dependant classes. Once found "leaf" class that doesn't have any more dependant entities it will start to go back and build path for that classes. In a result we will have table name and path to that tabe from the root table, so we can build sql to delete dependencies in the right order. It knows how to deal with @Embedded, bidirectional @OneToMany, @OneToMany through @JoinTable