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.openecomp.policy.rest.jpa;
22 import java.io.Serializable;
23 import java.util.Date;
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.NamedQueries;
31 import javax.persistence.NamedQuery;
32 import javax.persistence.OrderBy;
33 import javax.persistence.PrePersist;
34 import javax.persistence.PreUpdate;
35 import javax.persistence.Table;
36 import javax.persistence.Temporal;
37 import javax.persistence.TemporalType;
41 @Table(name="POLICYSCORE")
43 @NamedQuery(name="POLICYSCORE.findAll", query="SELECT p FROM PolicyScore p"),
44 @NamedQuery(name="POLICYSCORE.deleteAll", query="DELETE FROM PolicyScore WHERE 1=1"),
45 @NamedQuery(name="POLICYSCORE.findByPolicyName", query="Select p from PolicyScore p where p.PolicyName=:pname")
47 public class PolicyScore implements Serializable {
49 private static final long serialVersionUID = 1L;
51 private static String domain;
54 @GeneratedValue(strategy = GenerationType.AUTO)
58 @Column(name="POLICY_NAME", nullable=false)
60 private String PolicyName;
62 @Column(name="VERSIONEXTENSION", nullable=false)
64 private String VersionExtension;
66 @Column(name="POLICY_SCORE", nullable=true)
67 private String PolicyScore;
69 public PolicyScore() {
73 public PolicyScore(String pName, String pScore) {
77 public PolicyScore(String domain) {
85 public void setId(int id) {
88 public String getPolicyName() {
91 public void setPolicyName(String policyName) {
92 PolicyName = policyName;
94 public String getVersionExtension() {
95 return VersionExtension;
98 public void setVersionExtension(String versionExtension) {
99 VersionExtension = versionExtension;
101 public String getPolicyScore() {
104 public void setPolicyScore(String policyScore) {
105 PolicyScore = policyScore;