[#1736] Deprecate TableRecord.{store|refresh|delete}Using() methods as
being part of jOOQ's internal API
This commit is contained in:
parent
d22941a1f6
commit
8b605c86b5
@ -613,7 +613,7 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658,
|
||||
if (v) assertEquals(v4a, book4.getValue(TBook_REC_VERSION()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({ "unchecked", "deprecation" })
|
||||
@Test
|
||||
public void testNonUpdatables() throws Exception {
|
||||
jOOQAbstractTest.reset = false;
|
||||
|
||||
@ -129,7 +129,7 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658,
|
||||
/**
|
||||
* Extracted method for very similar tests with T_IDENTITY, T_IDENTITY_PK
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({ "unchecked", "deprecation" })
|
||||
private <R extends TableRecord<R>> void testInsertIdentity0(Table<R> table, TableField<R, Integer> id, TableField<R, Integer> val) throws Exception {
|
||||
|
||||
// Plain insert
|
||||
@ -460,7 +460,7 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658,
|
||||
assertEquals("Hitchcock", author.getValue(TAuthor_LAST_NAME()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({ "unchecked", "deprecation" })
|
||||
@Test
|
||||
public void testInsertReturning() throws Exception {
|
||||
if (TTriggers() == null) {
|
||||
|
||||
@ -1101,12 +1101,10 @@ public interface FactoryOperations extends Configuration {
|
||||
* This executes something like the following statement:
|
||||
* <code><pre>INSERT INTO [table] ... VALUES [record] </pre></code>
|
||||
* <p>
|
||||
* Unlike {@link TableRecord#storeUsing(TableField...)} or
|
||||
* {@link UpdatableRecord#store()}, this does not change any of the argument
|
||||
* <code>record</code>'s internal "changed" flags, such that a subsequent
|
||||
* call to {@link TableRecord#storeUsing(TableField...)} or
|
||||
* {@link UpdatableRecord#store()} might lead to another <code>INSERT</code>
|
||||
* statement being executed.
|
||||
* Unlike {@link UpdatableRecord#store()}, this does not change any of the
|
||||
* argument <code>record</code>'s internal "changed" flags, such that a
|
||||
* subsequent call to {@link UpdatableRecord#store()} might lead to another
|
||||
* <code>INSERT</code> statement being executed.
|
||||
*
|
||||
* @return The number of inserted records
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
|
||||
@ -171,7 +171,10 @@ public interface TableRecord<R extends TableRecord<R>> extends Record {
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @throws DataChangedException If optimistic locking is enabled and the
|
||||
* record has already been changed/deleted in the database
|
||||
* @deprecated - 2.5.0 [#1736] - These methods will be made part of jOOQ's
|
||||
* internal API soon. Do not reuse these methods.
|
||||
*/
|
||||
@Deprecated
|
||||
int storeUsing(TableField<R, ?>... keys) throws DataAccessException, DataChangedException;
|
||||
|
||||
/**
|
||||
@ -226,7 +229,10 @@ public interface TableRecord<R extends TableRecord<R>> extends Record {
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @throws DataChangedException If optimistic locking is enabled and the
|
||||
* record has already been changed/deleted in the database
|
||||
* @deprecated - 2.5.0 [#1736] - These methods will be made part of jOOQ's
|
||||
* internal API soon. Do not reuse these methods.
|
||||
*/
|
||||
@Deprecated
|
||||
int deleteUsing(TableField<R, ?>... keys) throws DataAccessException, DataChangedException;
|
||||
|
||||
/**
|
||||
@ -245,6 +251,9 @@ public interface TableRecord<R extends TableRecord<R>> extends Record {
|
||||
* record does not exist anymore in the database</li> <li>the
|
||||
* provided keys return several records.</li>
|
||||
* </ul>
|
||||
* @deprecated - 2.5.0 [#1736] - These methods will be made part of jOOQ's
|
||||
* internal API soon. Do not reuse these methods.
|
||||
*/
|
||||
@Deprecated
|
||||
void refreshUsing(TableField<R, ?>... keys) throws DataAccessException;
|
||||
}
|
||||
|
||||
@ -196,7 +196,6 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends Updatable
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @throws DataChangedException If optimistic locking is enabled and the
|
||||
* record has already been changed/deleted in the database
|
||||
* @see #storeUsing(TableField...)
|
||||
*/
|
||||
int store() throws DataAccessException, DataChangedException;
|
||||
|
||||
@ -254,7 +253,6 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends Updatable
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @throws DataChangedException If optimistic locking is enabled and the
|
||||
* record has already been changed/deleted in the database
|
||||
* @see #deleteUsing(TableField...)
|
||||
*/
|
||||
int delete() throws DataAccessException, DataChangedException;
|
||||
|
||||
@ -274,7 +272,6 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends Updatable
|
||||
* <li>something went wrong executing the query</li> <li>the
|
||||
* record does not exist anymore in the database</li>
|
||||
* </ul>
|
||||
* @see #refreshUsing(TableField...)
|
||||
*/
|
||||
void refresh() throws DataAccessException;
|
||||
|
||||
|
||||
@ -53,7 +53,6 @@ import org.jooq.UpdatableRecord;
|
||||
* {@link ResultQuery#fetchMap(org.jooq.Field)} and the database returns several
|
||||
* records per key.</li>
|
||||
* <li>When you refresh a {@link TableRecord} using
|
||||
* {@link TableRecord#refreshUsing(org.jooq.TableField...)}, or
|
||||
* {@link UpdatableRecord#refresh()}, and the record does not exist anymore in
|
||||
* the database.</li>
|
||||
* </ul>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user