T - database transaction typepublic abstract class AbstractSpringSchemaUpdate<T> extends AbstractSchemaUpdate<T> implements BeanNameAware, BeanFactoryAware, InitializingBean
SchemaUpdates declared in Spring BeanFactorys that infer their
names and required predecessors from their Spring bean attributes.
Instances infer their name and required predecessors from
their Spring bean name (specified by the id XML attribute) and Spring dependencies (specified by
the depends-on XML attribute), respectively.
Note: the use of depends-on is an abuse of Spring's dependency notation for convenience. Normally
depends-on refers to bean intialization ordering, whereas this class uses it to refer to schema update ordering.
Schema updates are not normally expected to have any initialization ordering requirements, so this abuse shouldn't matter.
If they do, this class should not be used.
The containing BeanFactory must be a ConfigurableBeanFactory (normally this is always the case).
| Modifier and Type | Field and Description |
|---|---|
protected BeanFactory |
beanFactory |
protected String |
beanName |
| Constructor and Description |
|---|
AbstractSpringSchemaUpdate() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Configures the update name and required predecessors based on the Spring bean's name and
BeanFactory dependencies. |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setBeanName(String beanName) |
protected void |
setRequiredPredecessorsFromDependencies()
Infer required predecessors from Spring dependencies.
|
getName, getRequiredPredecessors, isSingleAction, setName, setRequiredPredecessors, setSingleAction, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDatabaseActionsprotected String beanName
protected BeanFactory beanFactory
public void setBeanName(String beanName)
setBeanName in interface BeanNameAwarepublic void setBeanFactory(BeanFactory beanFactory)
setBeanFactory in interface BeanFactoryAwarepublic void afterPropertiesSet()
throws Exception
BeanFactory dependencies.afterPropertiesSet in interface InitializingBeanExceptionprotected void setRequiredPredecessorsFromDependencies()
IllegalArgumentException - if this instance's beanFactory is not yet configured,
or not a ConfigurableBeanFactoryCopyright © 2020. All rights reserved.