Skip to content

Package: Response

Response

nameinstructionbranchcomplexitylinemethod
Response(String, TypeDescriptor)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getId()
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%
getTypeDescriptor()
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%
isResult()
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%
setId(String)
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%
setResult(boolean)
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%
setTypeDescriptor(TypeDescriptor)
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: * Red Hat Inc
13: *******************************************************************************/
14: package org.eclipse.kapua.service.elasticsearch.client.model;
15:
16: import org.eclipse.kapua.KapuaSerializable;
17:
18: /**
19: * Base {@link Response} definition.
20: *
21: * @since 1.0.0
22: */
23: public abstract class Response implements KapuaSerializable {
24:
25: /**
26: * Record id (it should set by the datastore client component)
27: *
28: * @since 1.0.0
29: */
30: private String id;
31:
32: /**
33: * The {@link TypeDescriptor}.
34: *
35: * @since 1.0.0
36: */
37: private TypeDescriptor typeDescriptor;
38:
39: /**
40: * The result of the {@link Response}
41: *
42: * @since 1.0.0
43: */
44: private boolean result;
45:
46: /**
47: * Constructor.
48: *
49: * @param id the record id.
50: * @param typeDescriptor The {@link TypeDescriptor}
51: * @since 1.0.0
52: */
53: protected Response(String id, TypeDescriptor typeDescriptor) {
54: setId(id);
55: setTypeDescriptor(typeDescriptor);
56: }
57:
58: /**
59: * Gets the object id (the subject of the operation).
60: *
61: * @return The object id (the subject of the operation).
62: * @since 1.0.0
63: */
64: public String getId() {
65: return id;
66: }
67:
68: /**
69: * Sets the object id (the subject of the operation).
70: *
71: * @param id The object id (the subject of the operation).
72: * @since 1.0.0
73: */
74: public void setId(String id) {
75: this.id = id;
76: }
77:
78: /**
79: * Gets the {@link TypeDescriptor}.
80: *
81: * @return The {@link TypeDescriptor}.
82: * @since 1.0.0
83: */
84: public TypeDescriptor getTypeDescriptor() {
85: return typeDescriptor;
86: }
87:
88: /**
89: * Sets the {@link TypeDescriptor}.
90: *
91: * @param typeDescriptor The {@link TypeDescriptor}.
92: * @since 1.0.0
93: */
94: public void setTypeDescriptor(TypeDescriptor typeDescriptor) {
95: this.typeDescriptor = typeDescriptor;
96: }
97:
98: /**
99: * Gets the result condition.
100: *
101: * @return The result condition.
102: * @since 1.0.0
103: */
104: public boolean isResult() {
105: return result;
106: }
107:
108: /**
109: * Sets the result condition.
110: *
111: * @param result The result condition.
112: * @since 1.0.0
113: */
114: public void setResult(boolean result) {
115: this.result = result;
116: }
117:
118: }