org.dellroad.stuff.pobj
Class SpringPersistentObjectSchemaUpdate<T>
java.lang.Object
org.dellroad.stuff.schema.AbstractSchemaUpdate<T>
org.dellroad.stuff.schema.AbstractSpringSchemaUpdate<PersistentFileTransaction>
org.dellroad.stuff.pobj.SpringPersistentObjectSchemaUpdate<T>
- Type Parameters:
T - type of the persistent object
- All Implemented Interfaces:
- DatabaseAction<PersistentFileTransaction>, SchemaUpdate<PersistentFileTransaction>, BeanFactoryAware, BeanNameAware, InitializingBean
- Direct Known Subclasses:
- SpringXSLPersistentObjectSchemaUpdate
public abstract class SpringPersistentObjectSchemaUpdate<T>
- extends AbstractSpringSchemaUpdate<PersistentFileTransaction>
- implements DatabaseAction<PersistentFileTransaction>
Support superclass for Spring-enabled SchemaUpdates for use with
a PersistentObjectSchemaUpdater. Instances include a single DatabaseAction (namely, themselves).
SpringPersistentObjectSchemaUpdate
public SpringPersistentObjectSchemaUpdate()
apply
public abstract void apply(PersistentFileTransaction transaction)
- Apply this update to the given transaction.
- Specified by:
apply in interface DatabaseAction<PersistentFileTransaction>
- Parameters:
transaction - open transaction
getDatabaseActions
public final List<SpringPersistentObjectSchemaUpdate<T>> getDatabaseActions()
- Description copied from interface:
SchemaUpdate
- Get the action(s) that comprise this update. Ideally, individual actions should be atomic database operations, i.e.,
each one should either finish completely, or else leave the database in a state where it can be tried again.
In any case, each action will be applied within its own transaction when transactions are supported by the database
unless
SchemaUpdate.isSingleAction() returns true.
- Specified by:
getDatabaseActions in interface SchemaUpdate<PersistentFileTransaction>
- Returns:
- a list of zero or more actions to apply
- See Also:
SchemaUpdate.isSingleAction()