io.ebeaninternal.server.core.ObtainedTransactionImplicit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
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() {
server.commitTransaction();
}
@Override
public void endIfCreated() {
server.endTransaction();
}
@Override
public void clearIfCreated() {
server.clearServerTransaction();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy