Package: DeviceManagementOperationPropertyImpl
DeviceManagementOperationPropertyImpl
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DeviceManagementOperationPropertyImpl() |
|
|
|
|
|
||||||||||||||||||||
DeviceManagementOperationPropertyImpl(DeviceManagementOperationProperty) |
|
|
|
|
|
||||||||||||||||||||
DeviceManagementOperationPropertyImpl(String, String, String) |
|
|
|
|
|
||||||||||||||||||||
getName() |
|
|
|
|
|
||||||||||||||||||||
getPropertyType() |
|
|
|
|
|
||||||||||||||||||||
getPropertyValue() |
|
|
|
|
|
||||||||||||||||||||
parse(DeviceManagementOperationProperty) |
|
|
|
|
|
||||||||||||||||||||
setName(String) |
|
|
|
|
|
||||||||||||||||||||
setPropertyType(String) |
|
|
|
|
|
||||||||||||||||||||
setPropertyValue(String) |
|
|
|
|
|
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.device.management.registry.operation.internal;
14:
15: import org.eclipse.kapua.service.device.management.registry.operation.DeviceManagementOperationProperty;
16:
17: import javax.persistence.Basic;
18: import javax.persistence.Column;
19: import javax.persistence.Embeddable;
20:
21: @Embeddable
22: public class DeviceManagementOperationPropertyImpl implements DeviceManagementOperationProperty {
23:
24: @Basic
25: @Column(name = "name", nullable = false, updatable = false)
26: private String name;
27:
28: @Basic
29: @Column(name = "property_type", nullable = false, updatable = false)
30: private String propertyType;
31:
32: @Basic
33: @Column(name = "property_value", nullable = false, updatable = false)
34: private String propertyValue;
35:
36: public DeviceManagementOperationPropertyImpl() {
37: }
38:
39: private DeviceManagementOperationPropertyImpl(DeviceManagementOperationProperty jobStepProperty) {
40: setName(jobStepProperty.getName());
41: setPropertyType(jobStepProperty.getPropertyType());
42: setPropertyValue(jobStepProperty.getPropertyValue());
43: }
44:
45: public DeviceManagementOperationPropertyImpl(String name, String propertyType, String propertyValue) {
46: setName(name);
47: setPropertyType(propertyType);
48: setPropertyValue(propertyValue);
49: }
50:
51: @Override
52: public String getName() {
53: return name;
54: }
55:
56: @Override
57: public void setName(String name) {
58: this.name = name;
59: }
60:
61: @Override
62: public String getPropertyType() {
63: return propertyType;
64: }
65:
66: @Override
67: public void setPropertyType(String propertyType) {
68: this.propertyType = propertyType;
69: }
70:
71: @Override
72: public String getPropertyValue() {
73: return propertyValue;
74: }
75:
76: @Override
77: public void setPropertyValue(String propertyValue) {
78: this.propertyValue = propertyValue;
79: }
80:
81: public static DeviceManagementOperationPropertyImpl parse(DeviceManagementOperationProperty jobStepProperty) {
82:• return jobStepProperty != null ?
83: (jobStepProperty instanceof DeviceManagementOperationPropertyImpl ?
84: (DeviceManagementOperationPropertyImpl) jobStepProperty :
85: new DeviceManagementOperationPropertyImpl(jobStepProperty)) :
86: null;
87: }
88: }