2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.policy.rest.jpa;
22 import java.io.Serializable;
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;
36 @Table(name="POLICYSCORE")
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")
42 public class PolicyScore implements Serializable {
44 private static final long serialVersionUID = 1L;
46 private static String domain;
49 @GeneratedValue(strategy = GenerationType.AUTO)
53 @Column(name="POLICY_NAME", nullable=false)
55 private String PolicyName;
57 @Column(name="VERSIONEXTENSION", nullable=false)
59 private String VersionExtension;
61 @Column(name="POLICY_SCORE", nullable=true)
62 private String PolicyScore;
64 public PolicyScore() {
68 public PolicyScore(String pName, String pScore) {
72 public PolicyScore(String domain) {
80 public void setId(int id) {
83 public String getPolicyName() {
86 public void setPolicyName(String policyName) {
87 PolicyName = policyName;
89 public String getVersionExtension() {
90 return VersionExtension;
93 public void setVersionExtension(String versionExtension) {
94 VersionExtension = versionExtension;
96 public String getPolicyScore() {
99 public void setPolicyScore(String policyScore) {
100 PolicyScore = policyScore;