Replaced all tabs with spaces in java and pom.xml
[so.git] / mso-catalog-db / src / main / java / org / onap / so / db / catalog / beans / VnfComponentsRecipe.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.so.db.catalog.beans;
22
23 import java.io.Serializable;
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.Id;
27 import javax.persistence.Table;
28 import org.apache.commons.lang3.builder.EqualsBuilder;
29 import org.apache.commons.lang3.builder.HashCodeBuilder;
30 import org.apache.commons.lang3.builder.ToStringBuilder;
31 import com.openpojo.business.annotation.BusinessKey;
32
33 @Entity
34 @Table(name = "vnf_components_recipe")
35 public class VnfComponentsRecipe implements Serializable, Recipe {
36
37     private static final long serialVersionUID = 768026109321305392L;
38
39     @Id
40     @Column(name = "id")
41     private Integer id;
42
43     @BusinessKey
44     @Column(name = "ACTION")
45     private String action;
46
47     @Column(name = "DESCRIPTION")
48     private String description;
49
50     @BusinessKey
51     @Column(name = "ORCHESTRATION_URI")
52     private String orchestrationUri;
53
54     @Column(name = "RECIPE_TIMEOUT")
55     private Integer recipeTimeout;
56
57     @BusinessKey
58     @Column(name = "VNF_TYPE")
59     private String vnfType;
60
61     @Column(name = "VNF_COMPONENT_PARAM_XSD")
62     private String paramXsd;
63
64     @Column(name = "VNF_COMPONENT_TYPE")
65     private String vnfComponentType;
66
67     @BusinessKey
68     @Column(name = "VF_MODULE_MODEL_UUID")
69     private String vfModuleModelUUID;
70
71     @Override
72     public String toString() {
73         return new ToStringBuilder(this).append("id", id).append("action", action).append("description", description)
74                 .append("orchestrationUri", orchestrationUri).append("recipeTimeout", recipeTimeout)
75                 .append("vnfType", vnfType).append("paramXsd", paramXsd).append("vnfComponentType", vnfComponentType)
76                 .append("vfModuleModelUUID", vfModuleModelUUID).toString();
77     }
78
79     @Override
80     public boolean equals(final Object other) {
81         if (!(other instanceof VnfComponentsRecipe)) {
82             return false;
83         }
84         VnfComponentsRecipe castOther = (VnfComponentsRecipe) other;
85         return new EqualsBuilder().append(action, castOther.action).append(orchestrationUri, castOther.orchestrationUri)
86                 .append(vnfType, castOther.vnfType).append(vfModuleModelUUID, castOther.vfModuleModelUUID).isEquals();
87     }
88
89     @Override
90     public int hashCode() {
91         return new HashCodeBuilder().append(action).append(orchestrationUri).append(vnfType).append(vfModuleModelUUID)
92                 .toHashCode();
93     }
94
95     public Integer getId() {
96         return id;
97     }
98
99     public void setId(Integer id) {
100         this.id = id;
101     }
102
103     public String getAction() {
104         return action;
105     }
106
107     public void setAction(String action) {
108         this.action = action;
109     }
110
111     public String getDescription() {
112         return description;
113     }
114
115     public void setDescription(String description) {
116         this.description = description;
117     }
118
119     public void setOrchestrationUri(String orchestrationUri) {
120         this.orchestrationUri = orchestrationUri;
121     }
122
123     public void setRecipeTimeout(Integer recipeTimeout) {
124         this.recipeTimeout = recipeTimeout;
125     }
126
127     public String getVnfType() {
128         return vnfType;
129     }
130
131     public void setVnfType(String vnfType) {
132         this.vnfType = vnfType;
133     }
134
135     public String getParamXsd() {
136         return paramXsd;
137     }
138
139     public void setParamXsd(String paramXsd) {
140         this.paramXsd = paramXsd;
141     }
142
143     public String getVnfComponentType() {
144         return vnfComponentType;
145     }
146
147     public void setVnfComponentType(String vnfComponentType) {
148         this.vnfComponentType = vnfComponentType;
149     }
150
151     public String getVfModuleModelUUID() {
152         return vfModuleModelUUID;
153     }
154
155     public void setVfModuleModelUUID(String vfModuleModelUUID) {
156         this.vfModuleModelUUID = vfModuleModelUUID;
157     }
158
159     @Override
160     public String getOrchestrationUri() {
161         return orchestrationUri;
162     }
163
164     @Override
165     public Integer getRecipeTimeout() {
166         return recipeTimeout;
167     }
168 }