@Override public void delete(T entity) { Assert.notNull(entity, "The given id must not be null!"); couchbaseOperations.remove(entity); }
@Override public void deleteAll(Iterable<? extends T> entities) { Assert.notNull(entities, "The given Iterable of entities must not be null!"); for (T entity : entities) { couchbaseOperations.remove(entity); } }
@Override public void deleteAll(Iterable<? extends T> entities) { Assert.notNull(entities, "The given Iterable of entities must not be null!"); for (T entity : entities) { couchbaseOperations.remove(entity); } }
@Override public void delete(T entity) { Assert.notNull(entity, "The given id must not be null!"); couchbaseOperations.remove(entity); }
@Override public void deleteById(ID id) { Assert.notNull(id, "The given id must not be null!"); couchbaseOperations.remove(couchbaseOperations.getConverter().convertForWriteIfNeeded(id).toString()); }
@Override public void deleteById(ID id) { Assert.notNull(id, "The given id must not be null!"); couchbaseOperations.remove(couchbaseOperations.getConverter().convertForWriteIfNeeded(id).toString()); }
@Override public void deleteAll() { final ResolvedView resolvedView = determineView(); ViewQuery query = ViewQuery.from(resolvedView.getDesignDocument(), resolvedView.getViewName()); query.reduce(false); query.stale(getCouchbaseOperations().getDefaultConsistency().viewConsistency()); ViewResult response = couchbaseOperations.queryView(query); for (ViewRow row : response) { try { couchbaseOperations.remove(row.id()); } catch (DataRetrievalFailureException e) { //ignore stale deletions if (!(e.getCause() instanceof DocumentDoesNotExistException)) throw e; } } }
@Override public void deleteAll() { final ResolvedView resolvedView = determineView(); ViewQuery query = ViewQuery.from(resolvedView.getDesignDocument(), resolvedView.getViewName()); query.reduce(false); query.stale(getCouchbaseOperations().getDefaultConsistency().viewConsistency()); ViewResult response = couchbaseOperations.queryView(query); for (ViewRow row : response) { try { couchbaseOperations.remove(row.id()); } catch (DataRetrievalFailureException e) { //ignore stale deletions if (!(e.getCause() instanceof DocumentDoesNotExistException)) throw e; } } }