org.dellroad.stuff.schema
Class AbstractSchemaUpdate<T>
java.lang.Object
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.
AbstractSchemaUpdate
public AbstractSchemaUpdate()
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