@Test @DisplayName("return transaction `lifecycleFlags` if transaction is active") void returnActiveTxFlags() { TransactionalEntity entity = newEntity(true, true); LifecycleFlags originalFlags = entity.lifecycleFlags(); Transaction tx = entity.transaction(); assertThat(originalFlags) .isEqualTo(tx.lifecycleFlags()); ((TeEntity) entity).turnToDeleted(); assertThat(originalFlags) .isNotEqualTo(tx.lifecycleFlags()); }
@VisibleForTesting final @Nullable Transaction<I, ? extends TransactionalEntity<I, S, B>, S, B> transaction() { return transaction; }
TransactionalEntity extends AbstractEntity<I, S> { @VisibleForTesting final @Nullable Transaction<I, ? extends TransactionalEntity<I, S, B>, S, B> transaction() { return transaction; } }
TransactionalEntity extends AbstractEntity<I, S> { @VisibleForTesting final @Nullable Transaction<I, ? extends TransactionalEntity<I, S, B>, S, B> transaction() { return transaction; } protected  TransactionalEntity(); protected  TransactionalEntity(I id); }
TransactionalEntity extends AbstractEntity<I, S> { @VisibleForTesting final @Nullable Transaction<I, ? extends TransactionalEntity<I, S, B>, S, B> transaction() { return transaction; } protected  TransactionalEntity(); protected  TransactionalEntity(I id); @Internal final boolean changed(); @Override final LifecycleFlags getLifecycleFlags(); }
TransactionalEntity extends AbstractEntity<I, S> { @VisibleForTesting final @Nullable Transaction<I, ? extends TransactionalEntity<I, S, B>, S, B> transaction() { return transaction; } protected  TransactionalEntity(); protected  TransactionalEntity(I id); @Internal final boolean changed(); @Override final LifecycleFlags getLifecycleFlags();  }