@Override public boolean delete(Query query, Class<?> entityClass) throws DataAccessException { Assert.notNull(query, "Query must not be null"); Assert.notNull(entityClass, "Entity type must not be null"); WriteResult result = doDelete(query, entityClass, getTableName(entityClass)); return result != null && result.wasApplied(); }
/** * Create a {@link EntityWriteResult} from {@link WriteResult} and an entity. * * @param result must not be {@literal null}. * @param entity must not be {@literal null}. * @return the {@link EntityWriteResult} for {@link WriteResult} and an entity. */ static <T> EntityWriteResult<T> of(WriteResult result, T entity) { return new EntityWriteResult<>(result.getExecutionInfo(), result.wasApplied(), result.getRows(), entity); }