org.dellroad.stuff.schema
Class AbstractSchemaUpdate<T>

java.lang.Object
  extended by org.dellroad.stuff.schema.AbstractSchemaUpdate<T>
Type Parameters:
T - database transaction type
All Implemented Interfaces:
SchemaUpdate<T>
Direct Known Subclasses:
AbstractSpringSchemaUpdate

public abstract class AbstractSchemaUpdate<T>
extends Object
implements SchemaUpdate<T>

Support superclass for SchemaUpdate implementations with standard bean property implementations.


Constructor Summary
AbstractSchemaUpdate()
           
 
Method Summary
 String getName()
          Get the unique name of this update.
 Set<SchemaUpdate<T>> getRequiredPredecessors()
          Get the the other updates (if any) that must be applied before this update may be applied.
 boolean isSingleAction()
          Determine whether, if this instance contains multiple individual actions, should they be applied in a single transaction and recorded as a single update.
 void setName(String name)
           
 void setRequiredPredecessors(Set<SchemaUpdate<T>> requiredPredecessors)
           
 void setSingleAction(boolean singleAction)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.dellroad.stuff.schema.SchemaUpdate
getDatabaseActions
 

Constructor Detail

AbstractSchemaUpdate

public AbstractSchemaUpdate()
Method Detail

getName

public String getName()
Description copied from interface: SchemaUpdate
Get the unique name of this update. This name must be unique among all updates ever applied to the database and must never change once this update has been applied to any database.

Specified by:
getName in interface SchemaUpdate<T>
Returns:
the name of this update; must not be the empty string

setName

public void setName(String name)

getRequiredPredecessors

public Set<SchemaUpdate<T>> getRequiredPredecessors()
Description copied from interface: SchemaUpdate
Get the the other updates (if any) that must be applied before this update may be applied.

Specified by:
getRequiredPredecessors in interface SchemaUpdate<T>
Returns:
set of zero or more other updates
See Also:
SchemaUpdate.getName()

setRequiredPredecessors

public void setRequiredPredecessors(Set<SchemaUpdate<T>> requiredPredecessors)

isSingleAction

public boolean isSingleAction()
Description copied from interface: SchemaUpdate
Determine whether, if this instance contains multiple individual actions, should they be applied in a single transaction and recorded as a single update. Normally this is false. If true, partially completed updates can result if one of the action fails.

Specified by:
isSingleAction in interface SchemaUpdate<T>

setSingleAction

public void setSingleAction(boolean singleAction)

toString

public String toString()
Overrides:
toString in class Object