org.dellroad.stuff.pobj
Class SpringPersistentObjectSchemaUpdate<T>

java.lang.Object
  extended by org.dellroad.stuff.schema.AbstractSchemaUpdate<T>
      extended by org.dellroad.stuff.schema.AbstractSpringSchemaUpdate<PersistentFileTransaction>
          extended by 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).


Field Summary
 
Fields inherited from class org.dellroad.stuff.schema.AbstractSpringSchemaUpdate
beanFactory, beanName
 
Constructor Summary
SpringPersistentObjectSchemaUpdate()
           
 
Method Summary
abstract  void apply(PersistentFileTransaction transaction)
          Apply this update to the given transaction.
 List<SpringPersistentObjectSchemaUpdate<T>> getDatabaseActions()
          Get the action(s) that comprise this update.
 
Methods inherited from class org.dellroad.stuff.schema.AbstractSpringSchemaUpdate
afterPropertiesSet, setBeanFactory, setBeanName, setRequiredPredecessorsFromDependencies
 
Methods inherited from class org.dellroad.stuff.schema.AbstractSchemaUpdate
getName, getRequiredPredecessors, isSingleAction, setName, setRequiredPredecessors, setSingleAction, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpringPersistentObjectSchemaUpdate

public SpringPersistentObjectSchemaUpdate()
Method Detail

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()