Fixed the Sonar technical debt.
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / jpa / FirewallDictionaryList.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-REST
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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 package org.onap.policy.rest.jpa;
22
23 import java.io.Serializable;
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.NamedQuery;
31 import javax.persistence.OrderBy;
32 import javax.persistence.Table;
33
34
35 @Entity
36 @Table(name="parentdictionaryitems")
37 @NamedQuery(name="FirewallDictionaryList.findAll", query="SELECT e FROM FirewallDictionaryList e")
38 public class FirewallDictionaryList implements Serializable {
39         private static final long serialVersionUID = 1L;
40
41         private static String domain;
42
43         @Id
44         @GeneratedValue(strategy = GenerationType.AUTO)
45         @Column(name="id")
46         private int id;
47         
48         @Column(name="parentItemName", nullable=false)
49         @OrderBy("asc")
50         private String parentItemName;
51         
52         @Column(name="description")
53         private String description;
54         
55         @Column(name="addressList")
56         private String addressList;
57         
58         @Column(name="serviceList")
59         private String serviceList;
60
61         public int getId() {
62                 return this.id;
63         }
64
65         public void setId(int id) {
66                 this.id = id;
67         }
68         
69         public String getParentItemName() {
70                 return parentItemName;
71         }
72
73         public String getDescription() {
74                 return description;
75         }
76
77         public String getAddressList() {
78                 return addressList;
79         }
80
81         public String getServiceList() {
82                 return serviceList;
83         }
84
85         public void setParentItemName(String parentItemName) {
86                 this.parentItemName = parentItemName;
87         }
88
89         public void setDescription(String description) {
90                 this.description = description;
91         }
92
93         public void setAddressList(String addressList) {
94                 this.addressList = addressList;
95         }
96
97         public void setServiceList(String serviceList) {
98                 this.serviceList = serviceList;
99         }
100
101         public FirewallDictionaryList() {
102                 //An empty constructor
103         }
104         
105         public FirewallDictionaryList(String string, String userid) {
106                 this(domain);
107         }
108         public FirewallDictionaryList(String domain) {
109                 this.parentItemName = domain;
110         }       
111
112 }