package de.ivu.elect.interfaces.core;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;

@XmlAccessorType(XmlAccessType.FIELD)
public class GruppeReferenz implements Serializable {

  private static final long serialVersionUID = 1L;

  @XmlElement(required = true)
  private String schluessel;

  public GruppeReferenz() {
    super();
  }

  public GruppeReferenz(String schluessel) {
    this.schluessel = schluessel;
  }

  public String getSchluessel() {
    return schluessel;
  }

  public void setSchluessel(String schluessel) {
    this.schluessel = schluessel;
  }

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

    GruppeReferenz that = (GruppeReferenz) o;

    if (!schluessel.equals(that.schluessel)) return false;

    return true;
  }

  @Override
  public int hashCode() {
    return schluessel.hashCode();
  }

  @Override
  public String toString() {
    return "GruppeReferenz{" +
        "schluessel='" + schluessel + '\'' +
        '}';
  }
}
