package be.iminds.ilabt.jfed.highlevel.model;

import java.util.Objects;

/**
 * User: twalcari
 * Date: 7/14/2015
 * Time: 11:30
 */
public class ComponentInfo {
    private final String clientId;
    private final String componentId;

    public ComponentInfo(String clientId, String componentId) {
        this.clientId = clientId;
        this.componentId = componentId;
    }

    public String getClientId() {
        return clientId;
    }

    public String getComponentId() {
        return componentId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ComponentInfo that = (ComponentInfo) o;

        if (clientId != null ? !Objects.equals(clientId, that.clientId) : that.clientId != null) return false;
        if (componentId != null ? !Objects.equals(componentId, that.componentId) : that.componentId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = clientId != null ? clientId.hashCode() : 0;
        result = 31 * result + (componentId != null ? componentId.hashCode() : 0);
        return result;
    }
}
