2 * ============LICENSE_START=======================================================
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
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;
47 @GeneratedValue(strategy = GenerationType.AUTO)
51 @Column(name="POLICY_NAME", nullable=false)
53 private String PolicyName;
55 @Column(name="VERSIONEXTENSION", nullable=false)
57 private String VersionExtension;
59 @Column(name="POLICY_SCORE", nullable=true)
60 private String PolicyScore;
66 public void setId(int id) {
69 public String getPolicyName() {
72 public void setPolicyName(String policyName) {
73 PolicyName = policyName;
75 public String getVersionExtension() {
76 return VersionExtension;
79 public void setVersionExtension(String versionExtension) {
80 VersionExtension = versionExtension;
82 public String getPolicyScore() {
85 public void setPolicyScore(String policyScore) {
86 PolicyScore = policyScore;