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.onap.so.db.catalog.beans;
23 import java.io.Serializable;
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.Id;
28 import javax.persistence.Table;
30 import org.apache.commons.lang3.builder.EqualsBuilder;
31 import org.apache.commons.lang3.builder.HashCodeBuilder;
32 import org.apache.commons.lang3.builder.ToStringBuilder;
34 import com.openpojo.business.annotation.BusinessKey;
37 @Table(name = "vnf_components_recipe")
38 public class VnfComponentsRecipe implements Serializable, Recipe {
40 private static final long serialVersionUID = 768026109321305392L;
47 @Column(name = "ACTION")
48 private String action;
50 @Column(name = "DESCRIPTION")
51 private String description;
54 @Column(name = "ORCHESTRATION_URI")
55 private String orchestrationUri;
57 @Column(name = "RECIPE_TIMEOUT")
58 private Integer recipeTimeout;
61 @Column(name = "VNF_TYPE")
62 private String vnfType;
64 @Column(name = "VNF_COMPONENT_PARAM_XSD")
65 private String paramXsd;
67 @Column(name = "VNF_COMPONENT_TYPE")
68 private String vnfComponentType;
71 @Column(name = "VF_MODULE_MODEL_UUID")
72 private String vfModuleModelUUID;
75 public String toString() {
76 return new ToStringBuilder(this).append("id", id).append("action", action).append("description", description)
77 .append("orchestrationUri", orchestrationUri).append("recipeTimeout", recipeTimeout)
78 .append("vnfType", vnfType).append("paramXsd", paramXsd).append("vnfComponentType", vnfComponentType)
79 .append("vfModuleModelUUID", vfModuleModelUUID).toString();
83 public boolean equals(final Object other) {
84 if (!(other instanceof VnfComponentsRecipe)) {
87 VnfComponentsRecipe castOther = (VnfComponentsRecipe) other;
88 return new EqualsBuilder().append(action, castOther.action).append(orchestrationUri, castOther.orchestrationUri)
89 .append(vnfType, castOther.vnfType).append(vfModuleModelUUID, castOther.vfModuleModelUUID).isEquals();
93 public int hashCode() {
94 return new HashCodeBuilder().append(action).append(orchestrationUri).append(vnfType).append(vfModuleModelUUID)
98 public Integer getId() {
102 public void setId(Integer id) {
106 public String getAction() {
110 public void setAction(String action) {
111 this.action = action;
114 public String getDescription() {
118 public void setDescription(String description) {
119 this.description = description;
122 public void setOrchestrationUri(String orchestrationUri) {
123 this.orchestrationUri = orchestrationUri;
126 public void setRecipeTimeout(Integer recipeTimeout) {
127 this.recipeTimeout = recipeTimeout;
130 public String getVnfType() {
134 public void setVnfType(String vnfType) {
135 this.vnfType = vnfType;
138 public String getParamXsd() {
142 public void setParamXsd(String paramXsd) {
143 this.paramXsd = paramXsd;
146 public String getVnfComponentType() {
147 return vnfComponentType;
150 public void setVnfComponentType(String vnfComponentType) {
151 this.vnfComponentType = vnfComponentType;
154 public String getVfModuleModelUUID() {
155 return vfModuleModelUUID;
158 public void setVfModuleModelUUID(String vfModuleModelUUID) {
159 this.vfModuleModelUUID = vfModuleModelUUID;
163 public String getOrchestrationUri() {
164 return orchestrationUri;
168 public Integer getRecipeTimeout() {
169 return recipeTimeout;