Version 1.7.4
[gae.git] / java / src / main / com / google / appengine / api / search / AddException.java
blob8033c9ddea05d44d20707e2afcb1bb49eb595554
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 adding
9 * objects to the index.
11 * @deprecated as of 1.7.3. Use {@link PutException} instead.
13 @Deprecated
14 public class AddException extends SearchBaseException {
15 private static final long serialVersionUID = 3608247775865189592L;
17 private final List<OperationResult> results;
18 private final List<String> ids;
20 /**
21 * Constructs an exception when some error occurred in
22 * the search service when adding some objects to the index.
24 * @param operationResult the error code and message detail associated with
25 * the failure
27 public AddException(OperationResult operationResult) {
28 this(operationResult, new ArrayList<OperationResult>(), new ArrayList<String>());
31 /**
32 * Constructs an exception when some error occurred in
33 * the search service when adding some objects to the index.
35 * @param operationResult the error code and message detail associated with
36 * the failure
37 * @param results the list of {@link OperationResult} where each result is
38 * associated with an object that was requested to be added to the index
39 * @param ids the list of Ids of the object requested to be
40 * added to the index. The search service may provide an Id if none was given
41 * for an object
43 public AddException(OperationResult operationResult,
44 List<OperationResult> results, List<String> ids) {
45 super(operationResult);
46 this.results = results;
47 this.ids = ids;
50 /**
51 * @return the list of {@link OperationResult} where each result is
52 * associated with a request to be add to the index
54 public List<OperationResult> getResults() {
55 return results;
58 /**
59 * @return the list of Ids of objects that were requested to be added to
60 * the index
62 public List<String> getIds() {
63 return ids;