Fixes for sonar critical issues
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / jpa / PolicyManagement.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 import java.sql.Clob;
25 import java.sql.Timestamp;
26
27 import javax.persistence.Column;
28 import javax.persistence.Entity;
29 import javax.persistence.GeneratedValue;
30 import javax.persistence.GenerationType;
31 import javax.persistence.Id;
32 import javax.persistence.NamedQuery;
33 import javax.persistence.Table;
34
35
36 /**
37  * The persistent class for the roles database table.
38  * 
39  */
40 @Entity
41 @Table(name="policy_manangement")
42 @NamedQuery(name="PolicyManagement.findAll", query="SELECT r FROM PolicyManagement r")
43 public class PolicyManagement implements Serializable {
44         private static final long serialVersionUID = 1L;
45
46         @Id
47         @GeneratedValue(strategy = GenerationType.AUTO)
48         
49         @Column(name="id")
50         private int id;
51
52         @Column(name="POLICY_NAME", nullable=false, length=45)
53         private String policyName;      
54         
55         @Column(name="scope", nullable=false, length=45)
56         private String scope;
57
58         @Column(name="ONAP_NAME", nullable=false, length=45)
59         private String onapName;
60         
61         @Column(name="CONFIG_NAME", nullable=false, length=45)
62         private String configName;
63         
64         @Column(name="XML", nullable=false)
65         private transient Clob xml;
66         
67         @Column(name="CREATE_DATE_TIME", nullable=false)
68         private Timestamp createDateTime;
69         
70         
71         @Column(name="CREATED_BY", nullable=false, length=45)
72         private String createdBy;
73         
74         @Column(name="UPDATE_DATE_TIME", nullable=false)
75         private Timestamp updateDateTime;
76         
77         @Column(name="UPDATED_BY", nullable=false, length=45)
78         private String updatedBy;
79
80         public int getId() {
81                 return id;
82         }
83
84         public void setId(int id) {
85                 this.id = id;
86         }
87
88         public String getPolicyName() {
89                 return policyName;
90         }
91
92         public void setPolicyName(String policyName) {
93                 this.policyName = policyName;
94         }
95
96         public String getScope() {
97                 return scope;
98         }
99
100         public void setScope(String scope) {
101                 this.scope = scope;
102         }
103
104         public String getOnapName() {
105                 return onapName;
106         }
107
108         public void setOnapName(String onapName) {
109                 this.onapName = onapName;
110         }
111
112         public String getConfigName() {
113                 return configName;
114         }
115
116         public void setConfigName(String configName) {
117                 this.configName = configName;
118         }
119
120         public Clob getXml() {
121                 return xml;
122         }
123
124         public void setXml(Clob xml) {
125                 this.xml = xml;
126         }
127
128         public Timestamp getCreateDateTime() {
129                 return createDateTime;
130         }
131
132         public void setCreateDateTime(Timestamp createDateTime) {
133                 this.createDateTime = createDateTime;
134         }
135
136         public String getCreatedBy() {
137                 return createdBy;
138         }
139
140         public void setCreatedBy(String createdBy) {
141                 this.createdBy = createdBy;
142         }
143
144         public Timestamp getUpdateDateTime() {
145                 return updateDateTime;
146         }
147
148         public void setUpdateDateTime(Timestamp updateDateTime) {
149                 this.updateDateTime = updateDateTime;
150         }
151
152         public String getUpdatedBy() {
153                 return updatedBy;
154         }
155
156         public void setUpdatedBy(String updatedBy) {
157                 this.updatedBy = updatedBy;
158         }
159         
160         
161
162 }