SDN-C support&provide network layer tests Using IP
[sdnc/oam.git] / SdncReports / SdncReportsDao / src / main / java / com / onap / sdnc / reports / model / DeviceConfig.java
1 /*
2 * ============LICENSE_START=======================================================
3 * ONAP : SDNC-FEATURES
4 * ================================================================================
5 * Copyright 2018 TechMahindra
6 *=================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *     http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20 package com.onap.sdnc.reports.model;
21
22 import java.io.Serializable;
23 import java.util.Set;
24
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.OneToMany;
31 import javax.persistence.Table;
32
33 @Entity
34 @Table(name = "deviceconfig")
35 public class DeviceConfig implements Serializable 
36 {
37         private static final long serialVersionUID = -3009157732242241606L;
38         @Id
39         @GeneratedValue(strategy = GenerationType.AUTO)
40         @Column(name = "deviceid")
41         private long id;
42
43         @Column(name = "deviceIP")
44         private String deviceIP;
45         
46         @Column(name = "createdon")
47         private String createdon;
48         
49         @OneToMany(mappedBy="device")
50         private Set<PreTestConfig> preTestConfig;
51         
52         public DeviceConfig() {
53         }
54
55         public long getId() {
56                 return id;
57         }
58
59         public void setId(long id) {
60                 this.id = id;
61         }
62         
63         public String getCreationDate() {
64                 return createdon;
65         }
66
67         public void setCreationDate(String creationDate) {
68                 this.createdon = creationDate;
69         }
70         
71         public Set<PreTestConfig> getPreTestConfig() {
72                 return preTestConfig;
73         }
74
75         public void setPreTestConfig(Set<PreTestConfig> preTestConfig) {
76                 this.preTestConfig = preTestConfig;
77         }
78         
79         public String getDeviceIP() {
80                 return deviceIP;
81         }
82
83         public void setDeviceIP(String deviceIP) {
84                 this.deviceIP = deviceIP;
85         }
86
87         @Override
88         public String toString() {
89                 return "DeviceConfig [id=" + id + ", deviceName=" +  ", createdon=" + createdon
90                                 +  ", deviceIP=" + deviceIP + "]";
91         }
92 }