[#8033] Relax generic constraint on DSLContext.executeInsert(), executeUpdate() and similar methods
This commit is contained in:
parent
fb6b531388
commit
5de8a09645
@ -11539,7 +11539,7 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Support
|
||||
<R extends TableRecord<R>> int executeInsert(R record) throws DataAccessException;
|
||||
int executeInsert(TableRecord<?> record) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Update a table.
|
||||
@ -11549,7 +11549,7 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Support
|
||||
<R extends UpdatableRecord<R>> int executeUpdate(R record) throws DataAccessException;
|
||||
int executeUpdate(UpdatableRecord<?> record) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Update a table.
|
||||
@ -11559,7 +11559,7 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Support
|
||||
<R extends TableRecord<R>, T> int executeUpdate(R record, Condition condition) throws DataAccessException;
|
||||
int executeUpdate(TableRecord<?> record, Condition condition) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Delete a record from a table.
|
||||
@ -11569,7 +11569,7 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Support
|
||||
<R extends UpdatableRecord<R>> int executeDelete(R record) throws DataAccessException;
|
||||
int executeDelete(UpdatableRecord<?> record) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Delete a record from a table.
|
||||
@ -11579,5 +11579,5 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Support
|
||||
<R extends TableRecord<R>, T> int executeDelete(R record, Condition condition) throws DataAccessException;
|
||||
int executeDelete(TableRecord<?> record, Condition condition) throws DataAccessException;
|
||||
}
|
||||
|
||||
@ -4420,38 +4420,38 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
|
||||
|
||||
|
||||
@Override
|
||||
public <R extends TableRecord<R>> int executeInsert(R record) {
|
||||
InsertQuery<R> insert = insertQuery(record.getTable());
|
||||
public int executeInsert(TableRecord<?> record) {
|
||||
InsertQuery insert = insertQuery(record.getTable());
|
||||
insert.setRecord(record);
|
||||
return insert.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R extends UpdatableRecord<R>> int executeUpdate(R record) {
|
||||
UpdateQuery<R> update = updateQuery(record.getTable());
|
||||
public int executeUpdate(UpdatableRecord<?> record) {
|
||||
UpdateQuery update = updateQuery(record.getTable());
|
||||
Tools.addConditions(update, record, record.getTable().getPrimaryKey().getFieldsArray());
|
||||
update.setRecord(record);
|
||||
return update.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R extends TableRecord<R>, T> int executeUpdate(R record, Condition condition) {
|
||||
UpdateQuery<R> update = updateQuery(record.getTable());
|
||||
public int executeUpdate(TableRecord<?> record, Condition condition) {
|
||||
UpdateQuery update = updateQuery(record.getTable());
|
||||
update.addConditions(condition);
|
||||
update.setRecord(record);
|
||||
return update.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R extends UpdatableRecord<R>> int executeDelete(R record) {
|
||||
DeleteQuery<R> delete = deleteQuery(record.getTable());
|
||||
public int executeDelete(UpdatableRecord<?> record) {
|
||||
DeleteQuery delete = deleteQuery(record.getTable());
|
||||
Tools.addConditions(delete, record, record.getTable().getPrimaryKey().getFieldsArray());
|
||||
return delete.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R extends TableRecord<R>, T> int executeDelete(R record, Condition condition) {
|
||||
DeleteQuery<R> delete = deleteQuery(record.getTable());
|
||||
public int executeDelete(TableRecord<?> record, Condition condition) {
|
||||
DeleteQuery delete = deleteQuery(record.getTable());
|
||||
delete.addConditions(condition);
|
||||
return delete.execute();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user