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 FunctionArguments database table.
33 @Table(name="FunctionArguments")
34 @NamedQuery(name="FunctionArgument.findAll", query="SELECT f FROM FunctionArgument f")
35 public class FunctionArgument implements Serializable {
36 private static final long serialVersionUID = 1L;
39 @GeneratedValue(strategy=GenerationType.AUTO)
43 @Column(name="is_bag", nullable=false)
46 //bi-directional many-to-one association to FunctionDefinition
48 @JoinColumn(name="function_id")
49 private FunctionDefinition functionDefinition;
51 @Column(name="arg_index", nullable=false)
54 //bi-directional many-to-one association to Datatype
56 @JoinColumn(name="datatype_id")
57 private Datatype datatypeBean;
59 public FunctionArgument() {
62 public FunctionArgument(final FunctionArgument argument) {
63 this.argIndex = argument.argIndex;
64 this.datatypeBean = argument.datatypeBean;
65 this.isBag = argument.isBag;
66 this.functionDefinition = argument.functionDefinition;
73 public void setId(int id) {
77 public int getArgIndex() {
81 public void setArgIndex(int argIndex) {
82 this.argIndex = argIndex;
85 public Datatype getDatatypeBean() {
86 return this.datatypeBean;
89 public void setDatatypeBean(Datatype datatypeBean) {
90 this.datatypeBean = datatypeBean;
93 public FunctionDefinition getFunctionDefinition() {
94 return this.functionDefinition;
97 public int getIsBag() {
101 public void setIsBag(int isBag) {
105 public void setFunctionDefinition(FunctionDefinition functionDefinition) {
106 this.functionDefinition = functionDefinition;
111 public String toString() {
112 return "FunctionArgument [id=" + id + ", argIndex=" + argIndex
113 + ", datatypeBean=" + datatypeBean + ", isBag=" + isBag
114 + ", functionDefinition=" + functionDefinition + "]";
118 public boolean isBag() {
119 return this.isBag == 1;