Port to java 17
[ccsdk/apps.git] / ms / neng / src / main / java / org / onap / ccsdk / apps / ms / neng / persistence / entity / PolicyDetails.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : CCSDK.apps
4  * ================================================================================
5  * Copyright (C) 2018 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.ccsdk.apps.ms.neng.persistence.entity;
22
23 import java.io.Serializable;
24 import java.sql.Timestamp;
25 import jakarta.persistence.Column;
26 import jakarta.persistence.Entity;
27 import jakarta.persistence.GeneratedValue;
28 import jakarta.persistence.GenerationType;
29 import jakarta.persistence.Id;
30 import jakarta.persistence.Table;
31
32 /**
33  * Represents an entity representing policies stored in this micro-service (temporarily).
34  */
35 @Entity
36 @Table(name = "POLICY_MAN_SIM")
37 public class PolicyDetails implements Serializable {
38
39     private static final long serialVersionUID = 1L;
40     Integer policyId;
41     String policyName;
42     String policyResponse;
43     Timestamp createdTime;
44
45     /**
46      * Primary key for this entity.
47      */
48     @Id
49     @Column(name = "POLICY_ID")
50     @GeneratedValue(strategy = GenerationType.IDENTITY)
51     public Integer getPolicyId() {
52         return policyId;
53     }
54
55     public void setPolicyId(Integer policyId) {
56         this.policyId = policyId;
57     }
58
59     /**
60      * Name of the policy.
61      */
62     @Column(name = "POLICY_NAME")
63     public String getPolicyName() {
64         return policyName;
65     }
66
67     public void setPolicyName(String policyName) {
68         this.policyName = policyName;
69     }
70
71     /**
72      * The text form of the policy.
73      */
74     @Column(name = "POLICY_RESPONSE")
75     public String getPolicyResponse() {
76         return policyResponse;
77     }
78
79     public void setPolicyResponse(String policyResponse) {
80         this.policyResponse = policyResponse;
81     }
82
83     /**
84      * Time-stamp for this entity creation.
85      */
86     @Column(name = "CREATED_TIME")
87     public Timestamp getCreatedTime() {
88         return createdTime;
89     }
90
91     public void setCreatedTime(Timestamp createdTime) {
92         this.createdTime = createdTime;
93     }
94 }