/*
Copyright 2012 Adam Bien, adam-bien.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.lightview.model;
import java.util.List;
import java.util.Objects;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author adam bien, adam-bien.com
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Application {
private long id;
private String applicationName;
private List<String> components;
protected Application() {}
public long getId() {
return id;
}
public String getApplicationName() {
return applicationName;
}
public List<String> getComponents() {
return components;
}
@Override
public int hashCode() {
return Objects.hashCode(this.applicationName);
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Application other = (Application) obj;
if (!this.applicationName.equals(other.applicationName)) {
return false;
}
return true;
}
}