Skip to content

Package: BulkUpdateResponse

BulkUpdateResponse

nameinstructionbranchcomplexitylinemethod
BulkUpdateResponse()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
add(UpdateResponse)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getResponse()
M: 11 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
setResponse(List)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.elasticsearch.client.model;
14:
15: import java.util.ArrayList;
16: import java.util.List;
17:
18: /**
19: * {@link BulkUpdateResponse} definition.
20: * <p>
21: * It bundles a {@link List} of {@link UpdateRequest}
22: *
23: * @since 1.0.0
24: */
25: public class BulkUpdateResponse {
26:
27: List<UpdateResponse> responseList;
28:
29: /**
30: * Gets the {@link List} of {@link UpdateResponse}s.
31: *
32: * @return The {@link List} of {@link UpdateResponse}s.
33: * @since 1.0.0
34: */
35: public List<UpdateResponse> getResponse() {
36:• if (responseList == null) {
37: responseList = new ArrayList<>();
38: }
39:
40: return responseList;
41: }
42:
43: /**
44: * Adds an {@link UpdateResponse} to the {@link List}
45: *
46: * @param response The {@link UpdateResponse} to add.
47: * @since 1.0.0
48: */
49: public void add(UpdateResponse response) {
50: getResponse().add(response);
51: }
52:
53: /**
54: * Sets the {@link List} of {@link UpdateResponse}s.
55: *
56: * @param responseList The {@link List} of {@link UpdateResponse}s.
57: * @since 1.0.0
58: */
59: public void setResponse(List<UpdateResponse> responseList) {
60: this.responseList = responseList;
61: }
62:
63: }