Package 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
Support superclass for
SchemaUpdate implementations with standard bean property implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the unique name of this update.Set<SchemaUpdate<T>>Get the the other updates (if any) that must be applied before this update may be applied.booleanDetermine whether, if this instance contains multiple individual actions, should they be applied in a single transaction and recorded as a single update.voidvoidsetRequiredPredecessors(Set<SchemaUpdate<T>> requiredPredecessors) voidsetSingleAction(boolean singleAction) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.dellroad.stuff.schema.SchemaUpdate
getDatabaseActions
-
Constructor Details
-
AbstractSchemaUpdate
public AbstractSchemaUpdate()
-
-
Method Details
-
getName
Description copied from interface:SchemaUpdateGet 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:
getNamein interfaceSchemaUpdate<T>- Returns:
- the name of this update; must not be the empty string
-
setName
-
getRequiredPredecessors
Description copied from interface:SchemaUpdateGet the the other updates (if any) that must be applied before this update may be applied.- Specified by:
getRequiredPredecessorsin interfaceSchemaUpdate<T>- Returns:
- set of zero or more other updates
- See Also:
-
setRequiredPredecessors
-
isSingleAction
public boolean isSingleAction()Description copied from interface:SchemaUpdateDetermine 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:
isSingleActionin interfaceSchemaUpdate<T>- Returns:
- whether to execute this update atomically
-
setSingleAction
public void setSingleAction(boolean singleAction) -
toString
-