mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
Remove deprecated methods from Transaction, migrate setBatchGetGeneratedKeys() -> setGetGeneratedKeys() etc
All removed methods are renamed. Migrate to use the renamed method.
This commit is contained in:
1 parent
2e799be9e3
commit
ffb292dcd5
5 files changed
+1
-72
No files matched your search
@@ -440,14 +440,6 @@ public interface Transaction extends AutoCloseable {
|
|||||||
*/
|
*/
|
||||||
void setGetGeneratedKeys(boolean getGeneratedKeys);
|
void setGetGeneratedKeys(boolean getGeneratedKeys);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated renamed to setGetGeneratedKeys().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default void setBatchGetGeneratedKeys(boolean getGeneratedKeys) {
|
|
||||||
setGetGeneratedKeys(getGeneratedKeys);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default when mixing UpdateSql (or CallableSql) with Beans the batch is
|
* By default when mixing UpdateSql (or CallableSql) with Beans the batch is
|
||||||
* automatically flushed when you change (between persisting beans and
|
* automatically flushed when you change (between persisting beans and
|
||||||
@@ -463,14 +455,6 @@ public interface Transaction extends AutoCloseable {
|
|||||||
*/
|
*/
|
||||||
void setFlushOnMixed(boolean batchFlushOnMixed);
|
void setFlushOnMixed(boolean batchFlushOnMixed);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated renamed to setFlushOnMixed().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default void setBatchFlushOnMixed(boolean batchFlushOnMixed) {
|
|
||||||
setFlushOnMixed(batchFlushOnMixed);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default executing a query will automatically flush any batched
|
* By default executing a query will automatically flush any batched
|
||||||
* statements (persisted beans, executed UpdateSql etc).
|
* statements (persisted beans, executed UpdateSql etc).
|
||||||
@@ -480,14 +464,6 @@ public interface Transaction extends AutoCloseable {
|
|||||||
*/
|
*/
|
||||||
void setFlushOnQuery(boolean batchFlushOnQuery);
|
void setFlushOnQuery(boolean batchFlushOnQuery);
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated renamed to setFlushOnQuery().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default void setBatchFlushOnQuery(boolean batchFlushOnQuery) {
|
|
||||||
setFlushOnQuery(batchFlushOnQuery);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the batch (of persisted beans or executed UpdateSql etc)
|
* Return true if the batch (of persisted beans or executed UpdateSql etc)
|
||||||
* should be flushed prior to executing a query.
|
* should be flushed prior to executing a query.
|
||||||
@@ -496,14 +472,6 @@ public interface Transaction extends AutoCloseable {
|
|||||||
*/
|
*/
|
||||||
boolean isFlushOnQuery();
|
boolean isFlushOnQuery();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated renamed to isFlushOnQuery().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default boolean isBatchFlushOnQuery() {
|
|
||||||
return isFlushOnQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The batch will be flushing automatically but you can use this to explicitly
|
* The batch will be flushing automatically but you can use this to explicitly
|
||||||
* flush the batch if you like.
|
* flush the batch if you like.
|
||||||
@@ -519,14 +487,6 @@ public interface Transaction extends AutoCloseable {
|
|||||||
*/
|
*/
|
||||||
void flush() throws PersistenceException;
|
void flush() throws PersistenceException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated - migrate to flush().
|
|
||||||
* <p>
|
|
||||||
* flush() is preferred as it matches the JPA flush() method.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
void flushBatch() throws PersistenceException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the underlying Connection object.
|
* Return the underlying Connection object.
|
||||||
* <p>
|
* <p>
|
||||||
@@ -540,14 +500,6 @@ public interface Transaction extends AutoCloseable {
|
|||||||
*/
|
*/
|
||||||
Connection connection();
|
Connection connection();
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated migrate to connection().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default Connection getConnection() {
|
|
||||||
return connection();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add table modification information to the TransactionEvent.
|
* Add table modification information to the TransactionEvent.
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@@ -312,11 +312,6 @@ public abstract class SpiTransactionProxy implements SpiTransaction {
|
|||||||
transaction.flush();
|
transaction.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void flushBatch() throws PersistenceException {
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Connection connection() {
|
public Connection connection() {
|
||||||
return transaction.connection();
|
return transaction.connection();
|
||||||
|
|||||||
+1
-10
@@ -378,19 +378,12 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
|||||||
/**
|
/**
|
||||||
* Flush any queued persist requests.
|
* Flush any queued persist requests.
|
||||||
* <p>
|
* <p>
|
||||||
* This is general will result in a number of batched PreparedStatements
|
* This is general will result in a number of batched PreparedStatements executing.
|
||||||
* executing.
|
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void flush() {
|
public void flush() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void flushBatch() {
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the persistence context associated with this transaction.
|
* Return the persistence context associated with this transaction.
|
||||||
*/
|
*/
|
||||||
@@ -405,7 +398,6 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
|||||||
* This could be considered similar to EJB3 Extended PersistanceContext. In
|
* This could be considered similar to EJB3 Extended PersistanceContext. In
|
||||||
* that you get the PersistanceContext from a transaction, hold onto it, and
|
* that you get the PersistanceContext from a transaction, hold onto it, and
|
||||||
* then set it back later to a second transaction.
|
* then set it back later to a second transaction.
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setPersistenceContext(SpiPersistenceContext context) {
|
public void setPersistenceContext(SpiPersistenceContext context) {
|
||||||
@@ -503,7 +495,6 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
|||||||
* <p>
|
* <p>
|
||||||
* This leaves the transaction active and expects another commit
|
* This leaves the transaction active and expects another commit
|
||||||
* to occur later (which closes the underlying connection etc).
|
* to occur later (which closes the underlying connection etc).
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void commitAndContinue() {
|
public void commitAndContinue() {
|
||||||
|
|||||||
@@ -758,11 +758,6 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
|||||||
internalBatchFlush();
|
internalBatchFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public final void flushBatch() {
|
|
||||||
flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flush the JDBC batch and execute derived relationship statements if necessary.
|
* Flush the JDBC batch and execute derived relationship statements if necessary.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -283,10 +283,6 @@ final class NoTransaction implements SpiTransaction {
|
|||||||
public void flush() throws PersistenceException {
|
public void flush() throws PersistenceException {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void flushBatch() throws PersistenceException {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Connection connection() {
|
public Connection connection() {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in new issue
Block a user