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;
23 import java.io.Serializable;
25 import javax.persistence.*;
29 * The persistent class for the PIPResolverParams database table.
33 @Table(name="PIPResolverParams")
34 @NamedQuery(name="PIPResolverParam.findAll", query="SELECT p FROM PIPResolverParam p")
35 public class PIPResolverParam implements Serializable {
36 private static final long serialVersionUID = 1L;
39 @GeneratedValue(strategy=GenerationType.AUTO)
43 @Column(name="PARAM_NAME", nullable=false, length=1024)
44 private String paramName;
46 @Column(name="PARAM_VALUE", nullable=false, length=2048)
47 private String paramValue;
49 @Column(name="PARAM_DEFAULT", nullable=true, length=2048)
50 private String paramDefault;
52 @Column(name="REQUIRED", nullable=false)
53 private char required = '0';
55 //bi-directional many-to-one association to PIPResolver
57 @JoinColumn(name="ID_RESOLVER")
58 private PIPResolver pipresolver;
60 public PIPResolverParam() {
63 public PIPResolverParam(String name) {
64 this.paramName = name;
67 public PIPResolverParam(String name, String value) {
69 this.paramValue = value;
72 public PIPResolverParam(PIPResolverParam param) {
73 this(param.getParamName(), param.getParamValue());
74 this.paramDefault = param.getParamDefault();
75 this.required = param.required;
82 public void setId(int id) {
86 public String getParamName() {
87 return this.paramName;
90 public void setParamName(String paramName) {
91 this.paramName = paramName;
94 public String getParamValue() {
95 return this.paramValue;
98 public void setParamValue(String paramValue) {
99 this.paramValue = paramValue;
102 public String getParamDefault() {
106 public void setParamDefault(String paramDefault) {
107 this.paramDefault = paramDefault;
110 public char getRequired() {
114 public void setRequired(char required) {
115 this.required = required;
118 public PIPResolver getPipresolver() {
119 return this.pipresolver;
122 public void setPipresolver(PIPResolver pipresolver) {
123 this.pipresolver = pipresolver;
127 public boolean isRequired() {
128 return this.required == '1';
132 public void setRequired(boolean required) {
142 public String toString() {
143 return "PIPResolverParam [id=" + id + ", paramName=" + paramName
144 + ", paramValue=" + paramValue + ", required=" + required + "]";