APPLY - the type of the apply payloadROLLBACK - the type of the rollback payloadpublic class TemplateStep<APPLY,ROLLBACK>
extends java.lang.Object
Each step contains an apply operation that executes during the forward
migration, and an optional rollback operation that executes if the step
or a subsequent step fails.
steps:
- apply:
type: createCollection
collection: users
rollback:
type: dropCollection
collection: users
- apply:
type: insert
collection: users
parameters:
documents:
- name: "John"
rollback:
type: delete
collection: users
parameters:
filter: {}
| Constructor and Description |
|---|
TemplateStep() |
TemplateStep(APPLY apply,
ROLLBACK rollback) |
| Modifier and Type | Method and Description |
|---|---|
APPLY |
getApply()
Returns the apply payload for this step.
|
ROLLBACK |
getRollback()
Returns the rollback payload for this step.
|
boolean |
hasRollback()
Checks if this step has a rollback payload defined.
|
void |
setApply(APPLY apply)
Sets the apply payload for this step.
|
void |
setRollback(ROLLBACK rollback)
Sets the rollback payload for this step.
|
java.lang.String |
toString() |
public APPLY getApply()
public void setApply(APPLY apply)
apply - the apply payloadpublic ROLLBACK getRollback()
public void setRollback(ROLLBACK rollback)
rollback - the rollback payload (optional)public boolean hasRollback()
public java.lang.String toString()
toString in class java.lang.Object