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.
12 public class AddException
extends SearchBaseException
{
13 private static final long serialVersionUID
= 3608247775865189592L;
15 private final List
<OperationResult
> results
;
16 private final List
<String
> ids
;
19 * Constructs an exception when some error occurred in
20 * the search service when adding some objects to the index.
22 * @param operationResult the error code and message detail associated with
25 public AddException(OperationResult operationResult
) {
26 this(operationResult
, new ArrayList
<OperationResult
>(), new ArrayList
<String
>());
30 * Constructs an exception when some error occurred in
31 * the search service when adding some objects to the index.
33 * @param operationResult the error code and message detail associated with
35 * @param results the list of {@link OperationResult} where each result is
36 * associated with an object that was requested to be added to the index
37 * @param ids the list of Ids of the object requested to be
38 * added to the index. The search service may provide an Id if none was given
41 public AddException(OperationResult operationResult
,
42 List
<OperationResult
> results
, List
<String
> ids
) {
43 super(operationResult
);
44 this.results
= results
;
49 * @return the list of {@link OperationResult} where each result is
50 * associated with a request to be add to the index
52 public List
<OperationResult
> getResults() {
57 * @return the list of Ids of objects that were requested to be added to
60 public List
<String
> getIds() {