blob: 804627fa00e26ea805f7dac64e45a05cf8489c0c [file] [log] [blame]
Aharoni, Pavel (pa0916)ca3cb012018-10-22 15:29:57 +03001/*-
2 * ============LICENSE_START=======================================================
3 * OSAM Core
4 * ================================================================================
5 * Copyright (C) 2018 Netsia
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
21
22
23package org.onap.osam.model.dao;
24
25import lombok.Getter;
26import lombok.Setter;
27
28import javax.persistence.*;
29
30/**
31 * Created by Zafer Kaban on 18.09.2018.
32 */
33@Entity
34@Getter
35@Setter
36public class ONTDevice extends BaseEntity {
37
38 private String serialNumber;
39 @Enumerated(value = EnumType.STRING)
40 private ActivityState portAuthState;
41 @Enumerated(value = EnumType.STRING)
42 private AdminState adminState;
43 @Enumerated(value = EnumType.STRING)
44 private ActivityState operationalState;
45 private String ipAddress;
46 private String macAddress;
47 private int number;
Zafer Kabanb0a16682018-12-04 11:16:24 +030048 private int sTag;
49 private int cTag;
50 private String nasPortId;
51 private String circuitId;
52 private TechnologyProfile techProfile;
53 private SpeedProfile speedProfile;
Aharoni, Pavel (pa0916)ca3cb012018-10-22 15:29:57 +030054 @ManyToOne
55 @JoinColumn(name="OLTPort_id", nullable=false)
56 private OLTPort OLTPort;
57
58 @Override
59 public String toString() {
60 final StringBuilder sb = new StringBuilder("oltSlot{");
61 sb.append("id=").append(id);
62 sb.append(", serialNumber='").append(serialNumber).append('\'');
63 sb.append(", portAuthState='").append(portAuthState).append('\'');
64 sb.append(", adminState='").append(adminState).append('\'');
65 sb.append(", operationalState='").append(operationalState).append('\'');
66 sb.append(", macAddress='").append(macAddress).append('\'');
67 sb.append(", number='").append(number).append('\'');
68 sb.append(", ipAddress=").append(ipAddress);
Zafer Kabanb0a16682018-12-04 11:16:24 +030069 sb.append(", sTag=").append(ipAddress);
70 sb.append(", cTag=").append(cTag);
71 sb.append(", nasPortId=").append(nasPortId);
72 sb.append(", circuitId=").append(circuitId);
73 sb.append(", techProfile=").append(techProfile);
74 sb.append(", speedProfile=").append(speedProfile);
Aharoni, Pavel (pa0916)ca3cb012018-10-22 15:29:57 +030075 sb.append('}');
76 return sb.toString();
77 }
Zafer Kabanb0a16682018-12-04 11:16:24 +030078}