/*******************************************************************************
* Copyright (c) 2010-2014 SAP AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* SAP AG - initial API and implementation
*******************************************************************************/
package org.eclipse.skalli.model.ext.maven.recommendedupdatesites;
import java.util.UUID;
public class UpdateSite {
private UUID projectUUID;
private String groupId;
private String artifactId;
private String name;
private String description;
public UpdateSite() {
}
UpdateSite(UUID projectUUID, String groupId, String artifactId) {
this();
setProjectUUID(projectUUID);
setGroupId(groupId);
setArtifactId(artifactId);
}
public UUID getProjectUUID() {
return projectUUID;
}
public void setProjectUUID(UUID projectUUID) {
this.projectUUID = projectUUID;
}
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public String getArtifactId() {
return artifactId;
}
public void setArtifactId(String artifactId) {
this.artifactId = artifactId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public String toString() {
return "UpdateSite [projectUUID=" + projectUUID + ", name=" + name + ", description=" + description
+ ", groupId=" + groupId + ", artifactId=" + artifactId + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((artifactId == null) ? 0 : artifactId.hashCode());
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((groupId == null) ? 0 : groupId.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((projectUUID == null) ? 0 : projectUUID.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;
}
UpdateSite other = (UpdateSite) obj;
if (artifactId == null) {
if (other.artifactId != null) {
return false;
}
} else if (!artifactId.equals(other.artifactId)) {
return false;
}
if (groupId == null) {
if (other.groupId != null) {
return false;
}
} else if (!groupId.equals(other.groupId)) {
return false;
}
if (projectUUID == null) {
if (other.projectUUID != null) {
return false;
}
} else if (!projectUUID.equals(other.projectUUID)) {
return false;
}
return true;
}
}