Skip to content

Package: Request

Request

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