Package org.fastnate.generator.context
Class GenerationState.PendingState
java.lang.Object
org.fastnate.generator.context.GenerationState
org.fastnate.generator.context.GenerationState.PendingState
- Enclosing class:
GenerationState
Marks all pending updates for an entity, that was not written up to now.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classNested classes/interfaces inherited from class org.fastnate.generator.context.GenerationState
GenerationState.PendingState -
Field Summary
FieldsFields inherited from class org.fastnate.generator.context.GenerationState
PERSISTED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<E> voidaddPendingUpdate(E entity, Property<E, ?> property, Object... arguments) Adds an entity that has to be updated, as soon as the associated entity (of this state) was written.<E> voidwritePendingStatements(StatementsWriter writer, Object entity) Generates the update statements for all entities that are required after the given entity was generated.
-
Field Details
-
updates
-
-
Constructor Details
-
PendingState
public PendingState()
-
-
Method Details
-
addPendingUpdate
Adds an entity that has to be updated, as soon as the associated entity (of this state) was written.- Parameters:
entity- the entity to updateproperty- the property to writearguments- additional arguments to remember
-
writePendingStatements
Generates the update statements for all entities that are required after the given entity was generated.- Parameters:
writer- the target of the generated statementsentity- the entity that exists now in the database- Throws:
IOException- if the writer throws one
-
getUpdates
-