2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.mso.db.catalog.beans;
\r
23 import java.io.Serializable;
\r
24 import java.sql.Timestamp;
\r
26 public class VfModuleCustomization implements Serializable {
\r
28 private String modelCustomizationUuid;
\r
29 private String vfModuleModelUuid;
\r
30 private String label;
\r
31 private Integer minInstances;
\r
32 private Integer maxInstances;
\r
33 private Integer initialCount;
\r
34 private Integer availabilityZoneCount;
\r
35 private String heatEnvironmentArtifactUuid;
\r
36 private String volEnvironmentArtifactUuid;
\r
37 private Timestamp created;
\r
38 private VfModule vfModule;
\r
39 public static final long serialVersionUID = -1322322139926390329L;
\r
41 public VfModuleCustomization() {
\r
45 public String getModelCustomizationUuid() {
\r
46 return this.modelCustomizationUuid;
\r
48 public void setModelCustomizationUuid(String modelCustomizationUuid) {
\r
49 this.modelCustomizationUuid = modelCustomizationUuid;
\r
51 public String getVfModuleModelUuid() {
\r
52 return this.vfModuleModelUuid;
\r
54 public void setVfModuleModelUuid(String vfModuleModelUuid) {
\r
55 this.vfModuleModelUuid = vfModuleModelUuid;
\r
57 public String getHeatEnvironmentArtifactUuid() {
\r
58 return this.heatEnvironmentArtifactUuid;
\r
60 public void setHeatEnvironmentArtifactUuid(String heatEnvironmentArtifactUuid) {
\r
61 this.heatEnvironmentArtifactUuid = heatEnvironmentArtifactUuid;
\r
63 public String getVolEnvironmentArtifactUuid() {
\r
64 return this.volEnvironmentArtifactUuid;
\r
66 public void setVolEnvironmentArtifactUuid(String volEnvironmentArtifactUuid) {
\r
67 this.volEnvironmentArtifactUuid = volEnvironmentArtifactUuid;
\r
70 public Integer getMinInstances() {
\r
71 return this.minInstances;
\r
73 public void setMinInstances(Integer minInstances) {
\r
74 this.minInstances = minInstances;
\r
76 public Integer getMaxInstances() {
\r
77 return this.maxInstances;
\r
79 public void setMaxInstances(Integer maxInstances) {
\r
80 this.maxInstances = maxInstances;
\r
82 public Integer getInitialCount() {
\r
83 return this.initialCount;
\r
85 public void setInitialCount(Integer initialCount) {
\r
86 this.initialCount = initialCount;
\r
88 public Integer getAvailabilityZoneCount() {
\r
89 return this.availabilityZoneCount;
\r
91 public void setAvailabilityZoneCount(Integer availabilityZoneCount) {
\r
92 this.availabilityZoneCount = availabilityZoneCount;
\r
94 public Timestamp getCreated() {
\r
97 public void setCreated(Timestamp created) {
\r
98 this.created = created;
\r
100 public String getLabel() {
\r
103 public void setLabel(String label) {
\r
104 this.label = label;
\r
106 public VfModule getVfModule() {
\r
107 return this.vfModule;
\r
109 public void setVfModule(VfModule vfModule) {
\r
110 this.vfModule = vfModule;
\r
113 public String toString() {
\r
114 StringBuilder sb = new StringBuilder();
\r
115 sb.append("modelCustomizationUuid=" + this.modelCustomizationUuid);
\r
116 sb.append("vfModuleModelUuid=" + this.vfModuleModelUuid);
\r
117 sb.append("label=" + this.label);
\r
118 sb.append("initalCount=" + this.initialCount);
\r
119 sb.append("minInstances=" + this.minInstances);
\r
120 sb.append("maxInstances=" + this.maxInstances);
\r
121 sb.append("availabilityZoneCount=" + this.availabilityZoneCount);
\r
122 sb.append("heatEnvironmentArtifactUuid=" + this.heatEnvironmentArtifactUuid);
\r
123 sb.append("volEnvironmentArtifactUuid=" + this.volEnvironmentArtifactUuid);
\r
124 sb.append("created=" + this.created);
\r
125 return sb.toString();
\r
128 public boolean equals (Object o) {
\r
129 if (!(o instanceof VfModuleCustomization)) {
\r
135 VfModuleCustomization vfmc = (VfModuleCustomization) o;
\r
136 if (vfmc.getModelCustomizationUuid().equals(this.getModelCustomizationUuid()) && vfmc.getVfModuleModelUuid().equals(this.getVfModuleModelUuid())) {
\r
143 public int hashCode () {
\r
144 // hash code does not have to be a unique result - only that two objects that should be treated as equal
\r
145 // return the same value. so this should work.
\r
147 result = (this.modelCustomizationUuid != null ? this.modelCustomizationUuid.hashCode() : 0) + (this.vfModuleModelUuid != null ? this.vfModuleModelUuid.hashCode() : 0);
\r