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 PIPConfigParams database table.
33 @Table(name="PIPConfigParams")
34 @NamedQuery(name="PIPConfigParam.findAll", query="SELECT p FROM PIPConfigParam p")
35 public class PIPConfigParam 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 = null;
52 @Column(name="REQUIRED", nullable=false)
53 private char required = '0';
55 //bi-directional many-to-one association to PIPConfiguration
57 @JoinColumn(name="PIP_ID")
58 private PIPConfiguration pipconfiguration;
60 public PIPConfigParam() {
63 public PIPConfigParam(String param) {
64 this.paramName = param;
67 public PIPConfigParam(String param, String value) {
69 this.paramValue = value;
72 public PIPConfigParam(PIPConfigParam 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 PIPConfiguration getPipconfiguration() {
119 return this.pipconfiguration;
122 public void setPipconfiguration(PIPConfiguration pipconfiguration) {
123 this.pipconfiguration = pipconfiguration;
127 public boolean isRequired() {
128 return (this.required == '1');
132 public void setRequired(boolean required) {
134 this.setRequired('1');
136 this.setRequired('0');
142 public String toString() {
143 return "PIPConfigParam [id=" + id + ", paramName=" + paramName
144 + ", paramValue=" + paramValue + ", required=" + required + "]";