Revision created by MOE tool push_codebase.
[gae.git] / java / src / main / com / google / appengine / api / search / DeleteException.java
blobe68eab2c66a3c8293efa714eee0320e5659e3f98
1 // Copyright 2011 Google Inc. All rights reserved.
2 package com.google.appengine.api.search;
4 import java.util.ArrayList;
5 import java.util.List;
7 /**
8 * Thrown to indicate that a search service failure occurred while deleting
9 * objects.
12 public class DeleteException extends SearchBaseException {
13 private static final long serialVersionUID = 4601083521504723236L;
15 private final List<OperationResult> results;
17 /**
18 * Constructs an exception when some error occurred in
19 * the search service whilst processing a delete operation.
21 * @param operationResult the error code and message detail associated with
22 * the failure
24 public DeleteException(OperationResult operationResult) {
25 this(operationResult, new ArrayList<OperationResult>());
28 /**
29 * Constructs an exception when some error occurred in
30 * the search service whilst processing a delete operation.
32 * @param operationResult the error code and message detail associated with
33 * the failure
34 * @param results the list of {@link OperationResult} where each result is
35 * associated with the id of the object that was requested to be deleted
37 public DeleteException(OperationResult operationResult,
38 List<OperationResult> results) {
39 super(operationResult);
40 this.results = results;
43 /**
44 * @return the list of {@link OperationResult} where each result is
45 * associated with the id of the object that was requested to be deleted
47 public List<OperationResult> getResults() {
48 return results;