Remove redundant existsById from dao.removeById
This commit is contained in:
parent
50b2d0e488
commit
1a2040d4cd
@ -39,7 +39,7 @@ public interface Dao<T> {
|
|||||||
|
|
||||||
T saveAndFlush(TenantId tenantId, T t);
|
T saveAndFlush(TenantId tenantId, T t);
|
||||||
|
|
||||||
boolean removeById(TenantId tenantId, UUID id);
|
void removeById(TenantId tenantId, UUID id);
|
||||||
|
|
||||||
void removeAllByIds(Collection<UUID> ids);
|
void removeAllByIds(Collection<UUID> ids);
|
||||||
|
|
||||||
|
|||||||
@ -144,12 +144,9 @@ public abstract class JpaAbstractDao<E extends BaseEntity<D>, D>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public boolean removeById(TenantId tenantId, UUID id) {
|
public void removeById(TenantId tenantId, UUID id) {
|
||||||
// jdbcTemplate.queryForObject("DELETE FROM " + getEntityType().getTableName() + " WHERE id = ? RETURNING version", Integer.class, id);
|
|
||||||
// TODO: increment version...
|
|
||||||
getRepository().deleteById(id);
|
getRepository().deleteById(id);
|
||||||
log.debug("Remove request: {}", id);
|
log.debug("Remove request: {}", id);
|
||||||
return !getRepository().existsById(id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user