All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebeaninternal.server.core.ObtainedTransactionImplicit Maven / Gradle / Ivy

There is a newer version: 15.8.1
Show newest version
package io.ebeaninternal.server.core;

import io.ebeaninternal.api.SpiEbeanServer;
import io.ebeaninternal.api.SpiTransaction;

/**
 * Transaction started implicitly.
 * 

* This transaction is automatically committed / ends at the end of the operation. *

*/ final class ObtainedTransactionImplicit extends ObtainedTransaction { private final SpiEbeanServer server; /** * Wrap the transaction indicating if it was just created. */ ObtainedTransactionImplicit(SpiTransaction t, SpiEbeanServer server) { super(t); this.server = server; } @Override public void commitIfCreated() { transaction.commit(); } @Override public void endIfCreated() { server.endTransaction(); } @Override public void clearIfCreated() { server.clearServerTransaction(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy