io.ebeaninternal.server.core.ObtainedTransaction 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.SpiTransaction;
/**
* Basic case where there is already a transaction.
*
* Additionally notes if the transaction was created by the request in which
* case it needs to be commited after the request has been processed.
*
*/
class ObtainedTransaction {
final SpiTransaction transaction;
/**
* Wrap the transaction indicating if it was just created.
*/
ObtainedTransaction(SpiTransaction t) {
this.transaction = t;
}
/**
* Return the transaction (that was implicitly created if necessary).
*/
public SpiTransaction transaction() {
return transaction;
}
/**
* Commit if the transaction was created implicitly.
*/
public void commitIfCreated() {
// do nothing
}
/**
* End the transaction if it was created implicitly.
*/
public void endIfCreated() {
// do nothing
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy