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
-
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.boolean
Determine whether, if this instance contains multiple individual actions, should they be applied in a single transaction and recorded as a single update.void
void
setRequiredPredecessors
(Set<SchemaUpdate<T>> requiredPredecessors) void
setSingleAction
(boolean singleAction) 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 Details
-
AbstractSchemaUpdate
public AbstractSchemaUpdate()
-
-
Method Details
-
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 interfaceSchemaUpdate<T>
- Returns:
- the name of this update; must not be the empty string
-
setName
-
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 interfaceSchemaUpdate<T>
- Returns:
- set of zero or more other updates
- See Also:
-
setRequiredPredecessors
-
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 interfaceSchemaUpdate<T>
- Returns:
- whether to execute this update atomically
-
setSingleAction
public void setSingleAction(boolean singleAction) -
toString
-