[jOOQ/jOOQ#13260] Add DAO.deleteById(T) overload
This commit is contained in:
parent
e515046d93
commit
cbb7a7681c
@ -246,6 +246,16 @@ public interface DAO<R extends TableRecord<R>, P, T> {
|
||||
@Support
|
||||
void delete(Collection<P> objects) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Performs a <code>DELETE</code> statement for a given set of IDs.
|
||||
*
|
||||
* @param ids The IDs to be deleted
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @see #delete(Collection)
|
||||
*/
|
||||
@Support
|
||||
void deleteById(T id) throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Performs a <code>DELETE</code> statement for a given set of IDs.
|
||||
*
|
||||
|
||||
@ -270,6 +270,11 @@ public abstract class DAOImpl<R extends UpdatableRecord<R>, P, T> implements DAO
|
||||
records(objects, true).get(0).delete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public /* non-final */ void deleteById(T ids) {
|
||||
deleteById(singletonList(ids));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public /* non-final */ void deleteById(T... ids) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user