String tableName, List<AvroMutationCondition> conditions, Map<String,String> attributes)
throws AvroRepositoryException, AvroInterruptedException {
try {
AuthorizationContextHolder.setCurrentContext(converter.convert(authzContext));
LRepository repository = repositoryManager.getRepository(repositoryName);
LTable table = repository.getTable(tableName);
RecordId decodedRecordId = converter.convertAvroRecordId(recordId, repository);
Record record = null;
if (attributes == null) {
record = table.delete(decodedRecordId, converter.convertFromAvro(conditions, repository));
} else if (conditions == null) {
Record toDelete = table.newRecord(decodedRecordId);
toDelete.setAttributes(attributes);
table.delete(toDelete);
} else {
// There is no API call where a full record and MutationConditions can be supplied, so
// something has gone wrong if we get here
throw new IllegalStateException("Cannot delete a full record with MutationConditions");
}