/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.ow2.choreos.services.datamodel;
public class Recipe {
private String name;
private String cookbookName;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCookbookName() {
return cookbookName;
}
public void setCookbookName(String cookbookName) {
this.cookbookName = cookbookName;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((cookbookName == null) ? 0 : cookbookName.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Recipe other = (Recipe) obj;
if (cookbookName == null) {
if (other.cookbookName != null)
return false;
} else if (!cookbookName.equals(other.cookbookName))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
return true;
}
@Override
public String toString() {
return "Recipe [name=" + name + ", cookbookName=" + cookbookName + "]";
}
}