1 // Copyright 2011 Google Inc. All rights reserved.
2 package com
.google
.appengine
.api
.search
;
4 import java
.util
.ArrayList
;
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.
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
;
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
27 public AddException(OperationResult operationResult
) {
28 this(operationResult
, new ArrayList
<OperationResult
>(), new ArrayList
<String
>());
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
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
43 public AddException(OperationResult operationResult
,
44 List
<OperationResult
> results
, List
<String
> ids
) {
45 super(operationResult
);
46 this.results
= results
;
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() {
59 * @return the list of Ids of objects that were requested to be added to
62 public List
<String
> getIds() {