Merge pull request #3195 from ebean-orm/feature/deprecate-database-commitTransaction

Deprecate for removal Database.commitTransaction() and Database.rollb…
This commit is contained in:
Rob Bygrave
2023-08-27 20:32:07 +12:00
committed by GitHub
7 changed files with 21 additions and 9 deletions
+6
View File
@@ -267,15 +267,21 @@ public final class DB {
}
/**
* Deprecated for removal migrate using try-with-resources and commit on the transaction itself.
* <p>
* Commit the current transaction.
*/
@Deprecated(forRemoval = true)
public static void commitTransaction() {
getDefault().commitTransaction();
}
/**
* Deprecated for removal migrate to using try-with-resources and rollback on the transaction itself.
* <p>
* Rollback the current transaction.
*/
@Deprecated(forRemoval = true)
public static void rollbackTransaction() {
getDefault().rollbackTransaction();
}
@@ -650,13 +650,19 @@ public interface Database {
void flush();
/**
* Deprecated for removal migrate using try-with-resources and commit on the transaction itself.
* <p>
* Commit the current transaction.
*/
@Deprecated(forRemoval = true)
void commitTransaction();
/**
* Deprecated for removal migrate to using try-with-resources and rollback on the transaction itself.
* <p>
* Rollback the current transaction.
*/
@Deprecated(forRemoval = true)
void rollbackTransaction();
/**
@@ -56,7 +56,7 @@ public interface ExpressionList<T> {
/**
* Deprecated migrate to {@link #orderBy(String)}
*/
@Deprecated(since = "13.19")
@Deprecated(since = "13.19", forRemoval = true)
default ExpressionList<T> order(String orderByClause) {
return orderBy(orderByClause);
}
@@ -74,7 +74,7 @@ public interface ExpressionList<T> {
/**
* Deprecated migrate to orderBy().
*/
@Deprecated
@Deprecated(forRemoval = true)
default OrderBy<T> order() {
return orderBy();
}
+3 -3
View File
@@ -1398,7 +1398,7 @@ public interface Query<T> extends CancelableQuery {
/**
* Deprecated migrate to orderBy().
*/
@Deprecated(since = "13.19")
@Deprecated(since = "13.19", forRemoval = true)
default Query<T> order(String orderByClause) {
return orderBy(orderByClause);
}
@@ -1417,7 +1417,7 @@ public interface Query<T> extends CancelableQuery {
/**
* Deprecated migrate to orderBy().
*/
@Deprecated(since = "13.19")
@Deprecated(since = "13.19", forRemoval = true)
default OrderBy<T> order() {
return orderBy();
}
@@ -1430,7 +1430,7 @@ public interface Query<T> extends CancelableQuery {
/**
* Deprecated migrate to setOrderBy().
*/
@Deprecated(since = "13.19")
@Deprecated(since = "13.19", forRemoval = true)
default Query<T> setOrder(OrderBy<T> orderBy) {
return setOrderBy(orderBy);
}
@@ -2376,7 +2376,7 @@ public class DatabaseConfig {
* Sorry if returning Set rather than List breaks code but it feels safer to
* do that than a subtle change to return a shallow copy which you will not detect.
*/
@Deprecated
@Deprecated(forRemoval = true)
public Set<Class<?>> getClasses() {
return classes;
}
@@ -3389,7 +3389,7 @@ public class DatabaseConfig {
/**
* Deprecated - migrate to isLoadModuleInfo().
*/
@Deprecated
@Deprecated(forRemoval = true)
public boolean isAutoLoadModuleInfo() {
return loadModuleInfo;
}
@@ -48,7 +48,7 @@ public abstract class BeanRequest {
*/
public void commitTransIfRequired() {
if (createdTransaction) {
server.commitTransaction();
transaction.commit();
}
}
@@ -23,7 +23,7 @@ final class ObtainedTransactionImplicit extends ObtainedTransaction {
@Override
public void commitIfCreated() {
server.commitTransaction();
transaction.commit();
}
@Override