test_class.file: server/src/test/java/io/spine/server/entity/TransactionTest.java
test_class.identifier: TransactionTest
test_case.body: @Test
      @DisplayName("set transaction entity version from event context")
      void setVersionFromEventContext() {
          E entity = createEntity();
  
          Transaction<I, E, S, B> tx = createTx(entity);
          Event event = withMessage(createEventMessage());
  
          Version ctxVersion = event.context()
                                    .getVersion();
          assertThat(ctxVersion)
                  .isNotEqualTo(tx.version());
  
          applyEvent(tx, event);
          Version modifiedVersion = tx.version();
          assertThat(tx.version())
                  .isEqualTo(modifiedVersion);
      }
test_case.class_method_signature: TransactionTest.setVersionFromEventContext()
test_case.full_signature: @Test @DisplayName("set transaction entity version from event context") void setVersionFromEventContext()
test_case.identifier: setVersionFromEventContext
test_case.invocations: createEntity createTx withMessage createEventMessage getVersion context isNotEqualTo assertThat version applyEvent version isEqualTo assertThat version
test_case.modifiers: @Test @DisplayName("set transaction entity version from event context")
test_case.parameters: ()
test_case.return: void
test_case.signature: void setVersionFromEventContext()
focal_class.declarator: entity
focal_class.modifier: private final
focal_class.original_string: private final E entity;
focal_class.type: E
focal_class.var_name: entity
focal_class.declarator: initialState
focal_class.modifier: private final
focal_class.original_string: private final S initialState;
focal_class.type: S
focal_class.var_name: initialState
focal_class.declarator: initialVersion
focal_class.modifier: private final
focal_class.original_string: private final Version initialVersion;
focal_class.type: Version
focal_class.var_name: initialVersion
focal_class.declarator: builder
focal_class.modifier: private
focal_class.original_string: private B builder;
focal_class.type: B
focal_class.var_name: builder
focal_class.declarator: entityBeforeTransaction
focal_class.modifier: private final
focal_class.original_string: private final EntityRecord entityBeforeTransaction;
focal_class.type: EntityRecord
focal_class.var_name: entityBeforeTransaction
focal_class.declarator: version
focal_class.modifier: private
focal_class.original_string: private Version version;
focal_class.type: Version
focal_class.var_name: version
focal_class.declarator: lifecycleFlags
focal_class.modifier: private
focal_class.original_string: private LifecycleFlags lifecycleFlags;
focal_class.type: LifecycleFlags
focal_class.var_name: lifecycleFlags
focal_class.declarator: stateChanged
focal_class.modifier: private
focal_class.original_string: private boolean stateChanged;
focal_class.type: boolean
focal_class.var_name: stateChanged
focal_class.declarator: active = false
focal_class.modifier: @SuppressWarnings("UnusedAssignment") // is used to make the initial tx. state explicit.
      private
focal_class.original_string: @SuppressWarnings("UnusedAssignment") // is used to make the initial tx. state explicit.
      private boolean active = false;
focal_class.type: boolean
focal_class.var_name: active
focal_class.declarator: phases = newLinkedList()
focal_class.modifier: private final
focal_class.original_string: private final List<Phase<I>> phases = newLinkedList();
focal_class.type: List<Phase<I>>
focal_class.var_name: phases
focal_class.declarator: transactionListener
focal_class.modifier: private
focal_class.original_string: private TransactionListener<I> transactionListener;
focal_class.type: TransactionListener<I>
focal_class.var_name: transactionListener
focal_class.file: server/src/main/java/io/spine/server/entity/Transaction.java
focal_class.identifier: Transaction
focal_class.class_method_signature: Transaction.Transaction(E entity)
focal_class.full_signature: protected  Transaction(E entity)
focal_class.identifier: Transaction
focal_class.modifiers: protected
focal_class.parameters: (E entity)
focal_class.signature:  Transaction(E entity)
focal_class.class_method_signature: Transaction.toBuilder(E entity)
focal_class.full_signature: @VisibleForTesting static B toBuilder(E entity)
focal_class.identifier: toBuilder
focal_class.modifiers: @VisibleForTesting static
focal_class.parameters: (E entity)
focal_class.return: B
focal_class.signature: B toBuilder(E entity)
focal_class.class_method_signature: Transaction.Transaction(E entity, S state, Version version)
focal_class.full_signature: protected  Transaction(E entity, S state, Version version)
focal_class.identifier: Transaction
focal_class.modifiers: protected
focal_class.parameters: (E entity, S state, Version version)
focal_class.signature:  Transaction(E entity, S state, Version version)
focal_class.class_method_signature: Transaction.isActive()
focal_class.full_signature: @VisibleForTesting final boolean isActive()
focal_class.identifier: isActive
focal_class.modifiers: @VisibleForTesting final
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isActive()
focal_class.class_method_signature: Transaction.lifecycleFlags()
focal_class.full_signature: final LifecycleFlags lifecycleFlags()
focal_class.identifier: lifecycleFlags
focal_class.modifiers: final
focal_class.parameters: ()
focal_class.return: LifecycleFlags
focal_class.signature: LifecycleFlags lifecycleFlags()
focal_class.class_method_signature: Transaction.entityId()
focal_class.full_signature:  MessageId entityId()
focal_class.identifier: entityId
focal_class.parameters: ()
focal_class.return: MessageId
focal_class.signature: MessageId entityId()
focal_class.class_method_signature: Transaction.entity()
focal_class.full_signature: protected final E entity()
focal_class.identifier: entity
focal_class.modifiers: protected final
focal_class.parameters: ()
focal_class.return: E
focal_class.signature: E entity()
focal_class.class_method_signature: Transaction.version()
focal_class.full_signature: final Version version()
focal_class.identifier: version
focal_class.modifiers: final
focal_class.parameters: ()
focal_class.return: Version
focal_class.signature: Version version()
focal_class.class_method_signature: Transaction.phases()
focal_class.full_signature: final List<Phase<I>> phases()
focal_class.identifier: phases
focal_class.modifiers: final
focal_class.parameters: ()
focal_class.return: List<Phase<I>>
focal_class.signature: List<Phase<I>> phases()
focal_class.class_method_signature: Transaction.propagate(Phase<I> phase)
focal_class.full_signature: @CanIgnoreReturnValue protected final DispatchOutcome propagate(Phase<I> phase)
focal_class.identifier: propagate
focal_class.modifiers: @CanIgnoreReturnValue protected final
focal_class.parameters: (Phase<I> phase)
focal_class.return: DispatchOutcome
focal_class.signature: DispatchOutcome propagate(Phase<I> phase)
focal_class.class_method_signature: Transaction.propagateFailsafe(Phase<I> phase)
focal_class.full_signature: private DispatchOutcome propagateFailsafe(Phase<I> phase)
focal_class.identifier: propagateFailsafe
focal_class.modifiers: private
focal_class.parameters: (Phase<I> phase)
focal_class.return: DispatchOutcome
focal_class.signature: DispatchOutcome propagateFailsafe(Phase<I> phase)
focal_class.class_method_signature: Transaction.incrementStateAndVersion(VersionIncrement increment)
focal_class.full_signature: @SuppressWarnings("unchecked") final void incrementStateAndVersion(VersionIncrement increment)
focal_class.identifier: incrementStateAndVersion
focal_class.modifiers: @SuppressWarnings("unchecked") final
focal_class.parameters: (VersionIncrement increment)
focal_class.return: void
focal_class.signature: void incrementStateAndVersion(VersionIncrement increment)
focal_class.class_method_signature: Transaction.commitIfActive()
focal_class.full_signature: public final void commitIfActive()
focal_class.identifier: commitIfActive
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void commitIfActive()
focal_class.class_method_signature: Transaction.commit()
focal_class.full_signature: @VisibleForTesting public final void commit()
focal_class.identifier: commit
focal_class.modifiers: @VisibleForTesting public final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void commit()
focal_class.class_method_signature: Transaction.withPhases()
focal_class.full_signature: private boolean withPhases()
focal_class.identifier: withPhases
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean withPhases()
focal_class.class_method_signature: Transaction.doCommit(@NonValidated S newState)
focal_class.full_signature: private void doCommit(@NonValidated S newState)
focal_class.identifier: doCommit
focal_class.modifiers: private
focal_class.parameters: (@NonValidated S newState)
focal_class.return: void
focal_class.signature: void doCommit(@NonValidated S newState)
focal_class.class_method_signature: Transaction.updateState(@NonValidated S newState)
focal_class.full_signature: private void updateState(@NonValidated S newState)
focal_class.identifier: updateState
focal_class.modifiers: private
focal_class.parameters: (@NonValidated S newState)
focal_class.return: void
focal_class.signature: void updateState(@NonValidated S newState)
focal_class.class_method_signature: Transaction.updateColumns()
focal_class.full_signature: private void updateColumns()
focal_class.identifier: updateColumns
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateColumns()
focal_class.class_method_signature: Transaction.updateVersion()
focal_class.full_signature: private void updateVersion()
focal_class.identifier: updateVersion
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateVersion()
focal_class.class_method_signature: Transaction.updateStateChanged()
focal_class.full_signature: private void updateStateChanged()
focal_class.identifier: updateStateChanged
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateStateChanged()
focal_class.class_method_signature: Transaction.stateWithColumns()
focal_class.full_signature: @SuppressWarnings("unchecked") // Logically correct. private S stateWithColumns()
focal_class.identifier: stateWithColumns
focal_class.modifiers: @SuppressWarnings("unchecked") // Logically correct. private
focal_class.parameters: ()
focal_class.return: S
focal_class.signature: S stateWithColumns()
focal_class.class_method_signature: Transaction.propagateValue(InterfaceBasedColumn column, Message.Builder entityState)
focal_class.full_signature: private void propagateValue(InterfaceBasedColumn column, Message.Builder entityState)
focal_class.identifier: propagateValue
focal_class.modifiers: private
focal_class.parameters: (InterfaceBasedColumn column, Message.Builder entityState)
focal_class.return: void
focal_class.signature: void propagateValue(InterfaceBasedColumn column, Message.Builder entityState)
focal_class.class_method_signature: Transaction.deactivate()
focal_class.full_signature: @VisibleForTesting final void deactivate()
focal_class.identifier: deactivate
focal_class.modifiers: @VisibleForTesting final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void deactivate()
focal_class.class_method_signature: Transaction.beforeCommit(S newState, Version newVersion)
focal_class.full_signature: private void beforeCommit(S newState, Version newVersion)
focal_class.identifier: beforeCommit
focal_class.modifiers: private
focal_class.parameters: (S newState, Version newVersion)
focal_class.return: void
focal_class.signature: void beforeCommit(S newState, Version newVersion)
focal_class.class_method_signature: Transaction.afterCommit(EntityRecord newEntity)
focal_class.full_signature: private void afterCommit(EntityRecord newEntity)
focal_class.identifier: afterCommit
focal_class.modifiers: private
focal_class.parameters: (EntityRecord newEntity)
focal_class.return: void
focal_class.signature: void afterCommit(EntityRecord newEntity)
focal_class.class_method_signature: Transaction.rollback(Error cause)
focal_class.full_signature: @VisibleForTesting final void rollback(Error cause)
focal_class.identifier: rollback
focal_class.modifiers: @VisibleForTesting final
focal_class.parameters: (Error cause)
focal_class.return: void
focal_class.signature: void rollback(Error cause)
focal_class.class_method_signature: Transaction.rollback(Event cause)
focal_class.full_signature: @VisibleForTesting final void rollback(Event cause)
focal_class.identifier: rollback
focal_class.modifiers: @VisibleForTesting final
focal_class.parameters: (Event cause)
focal_class.return: void
focal_class.signature: void rollback(Event cause)
focal_class.class_method_signature: Transaction.doRollback(Consumer<EntityRecord> recordConsumer)
focal_class.full_signature: private void doRollback(Consumer<EntityRecord> recordConsumer)
focal_class.identifier: doRollback
focal_class.modifiers: private
focal_class.parameters: (Consumer<EntityRecord> recordConsumer)
focal_class.return: void
focal_class.signature: void doRollback(Consumer<EntityRecord> recordConsumer)
focal_class.class_method_signature: Transaction.rollbackStateAndVersion()
focal_class.full_signature: private void rollbackStateAndVersion()
focal_class.identifier: rollbackStateAndVersion
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rollbackStateAndVersion()
focal_class.class_method_signature: Transaction.entityRecord()
focal_class.full_signature: private EntityRecord entityRecord()
focal_class.identifier: entityRecord
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: EntityRecord
focal_class.signature: EntityRecord entityRecord()
focal_class.class_method_signature: Transaction.currentBuilderState()
focal_class.full_signature: private @NonValidated S currentBuilderState()
focal_class.identifier: currentBuilderState
focal_class.modifiers: private @NonValidated
focal_class.parameters: ()
focal_class.return: S
focal_class.signature: S currentBuilderState()
focal_class.class_method_signature: Transaction.releaseTx()
focal_class.full_signature: private void releaseTx()
focal_class.identifier: releaseTx
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void releaseTx()
focal_class.class_method_signature: Transaction.commitAttributeChanges()
focal_class.full_signature: protected final void commitAttributeChanges()
focal_class.identifier: commitAttributeChanges
focal_class.modifiers: protected final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void commitAttributeChanges()
focal_class.class_method_signature: Transaction.initAll(S state, Version version)
focal_class.full_signature: final void initAll(S state, Version version)
focal_class.identifier: initAll
focal_class.modifiers: final
focal_class.parameters: (S state, Version version)
focal_class.return: void
focal_class.signature: void initAll(S state, Version version)
focal_class.class_method_signature: Transaction.builder()
focal_class.full_signature: final B builder()
focal_class.identifier: builder
focal_class.modifiers: final
focal_class.parameters: ()
focal_class.return: B
focal_class.signature: B builder()
focal_class.class_method_signature: Transaction.stateChanged()
focal_class.full_signature: final boolean stateChanged()
focal_class.identifier: stateChanged
focal_class.modifiers: final
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean stateChanged()
focal_class.class_method_signature: Transaction.markStateChanged()
focal_class.full_signature: @VisibleForTesting final void markStateChanged()
focal_class.identifier: markStateChanged
focal_class.modifiers: @VisibleForTesting final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void markStateChanged()
focal_class.class_method_signature: Transaction.injectTo(E entity)
focal_class.full_signature: private void injectTo(E entity)
focal_class.identifier: injectTo
focal_class.modifiers: private
focal_class.parameters: (E entity)
focal_class.return: void
focal_class.signature: void injectTo(E entity)
focal_class.class_method_signature: Transaction.setVersion(Version version)
focal_class.full_signature: final void setVersion(Version version)
focal_class.identifier: setVersion
focal_class.modifiers: final
focal_class.parameters: (Version version)
focal_class.return: void
focal_class.signature: void setVersion(Version version)
focal_class.class_method_signature: Transaction.initVersion(Version version)
focal_class.full_signature: private void initVersion(Version version)
focal_class.identifier: initVersion
focal_class.modifiers: private
focal_class.parameters: (Version version)
focal_class.return: void
focal_class.signature: void initVersion(Version version)
focal_class.class_method_signature: Transaction.listener()
focal_class.full_signature: private TransactionListener<I> listener()
focal_class.identifier: listener
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: TransactionListener<I>
focal_class.signature: TransactionListener<I> listener()
focal_class.class_method_signature: Transaction.setListener(TransactionListener<I> listener)
focal_class.full_signature: public final void setListener(TransactionListener<I> listener)
focal_class.identifier: setListener
focal_class.modifiers: public final
focal_class.parameters: (TransactionListener<I> listener)
focal_class.return: void
focal_class.signature: void setListener(TransactionListener<I> listener)
focal_class.class_method_signature: Transaction.setArchived(boolean archived)
focal_class.full_signature: protected final void setArchived(boolean archived)
focal_class.identifier: setArchived
focal_class.modifiers: protected final
focal_class.parameters: (boolean archived)
focal_class.return: void
focal_class.signature: void setArchived(boolean archived)
focal_class.class_method_signature: Transaction.setDeleted(boolean deleted)
focal_class.full_signature: protected final void setDeleted(boolean deleted)
focal_class.identifier: setDeleted
focal_class.modifiers: protected final
focal_class.parameters: (boolean deleted)
focal_class.return: void
focal_class.signature: void setDeleted(boolean deleted)
focal_method.body: final Version version() {
          return version;
      }
focal_method.class_method_signature: Transaction.version()
focal_method.full_signature: final Version version()
focal_method.identifier: version
focal_method.modifiers: final
focal_method.parameters: ()
focal_method.return: Version
focal_method.signature: Version version()