|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - database transaction typepublic interface SchemaUpdate<T>
A one-time database schema update. Instances typically perform changes to the database schema, though non-schema updates that just manipulate the data in the database are perfectly valid as well.
Each SchemaUpdate has a unique name among all updates ever applied to a single database, and zero
or more required predecessors, which are other dependent updates that must be applied first.
Once an update has been applied to a database, it must not be changed; otherwise, inconsistencies can exist between databases that were updated using the old version vs. databases that were updated using the new version. If an update has been applied but had the wrong behavior, instead of changing the update, it's better to create a new update that depends on the first as a predecessor and corrects the mistake.
If you do have to change an update after it has been applied, then those databases that have already seen the previous version of the update must be manually corrected so they are in the same state that the new version of the update would have left them.
| Method Summary | |
|---|---|
List<? extends DatabaseAction<T>> |
getDatabaseActions()
Get the action(s) that comprise this update. |
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. |
| Method Detail |
|---|
String getName()
Set<SchemaUpdate<T>> getRequiredPredecessors()
getName()List<? extends DatabaseAction<T>> getDatabaseActions()
isSingleAction() returns true.
isSingleAction()boolean isSingleAction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||