3bb0919b76d68c018267d401a860f78876f61df3
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / jpa / PolicyScore.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-REST
4  * ================================================================================
5  * Copyright (C) 2017-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.policy.rest.jpa;
22 import java.io.Serializable;
23
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.GenerationType;
28 import javax.persistence.Id;
29 import javax.persistence.NamedQueries;
30 import javax.persistence.NamedQuery;
31 import javax.persistence.OrderBy;
32 import javax.persistence.Table;
33
34
35 @Entity
36 @Table(name="POLICYSCORE")
37 @NamedQueries({
38     @NamedQuery(name="POLICYSCORE.findAll", query="SELECT p FROM PolicyScore p"),
39     @NamedQuery(name="POLICYSCORE.deleteAll", query="DELETE FROM PolicyScore WHERE 1=1"),
40     @NamedQuery(name="POLICYSCORE.findByPolicyName", query="Select p from PolicyScore p where p.PolicyName=:pname")
41 })
42 public class PolicyScore implements Serializable {
43
44     private static final long serialVersionUID = 1L;
45
46     @Id
47     @GeneratedValue(strategy = GenerationType.AUTO)
48     @Column(name="id")
49     private int id;
50
51     @Column(name="POLICY_NAME", nullable=false)
52     @OrderBy("asc")
53     private String PolicyName;
54
55     @Column(name="VERSIONEXTENSION", nullable=false)
56     @OrderBy("asc")
57     private String VersionExtension;
58
59     @Column(name="POLICY_SCORE", nullable=true)
60     private String PolicyScore;
61
62     public int getId() {
63         return id;
64     }
65
66     public void setId(int id) {
67         this.id = id;
68     }
69     public String getPolicyName() {
70         return PolicyName;
71     }
72     public void setPolicyName(String policyName) {
73         PolicyName = policyName;
74     }
75     public String getVersionExtension() {
76         return VersionExtension;
77     }
78
79     public void setVersionExtension(String versionExtension) {
80         VersionExtension = versionExtension;
81     }
82     public String getPolicyScore() {
83         return PolicyScore;
84     }
85     public void setPolicyScore(String policyScore) {
86         PolicyScore = policyScore;
87     }
88
89
90 }