package es.dalocar.software.beans;

// Generated 29-oct-2009 22:50:47 by Hibernate Tools 3.2.4.GA

/**
 * FacturaId generated by hbm2java
 */
public class FacturaId implements java.io.Serializable {

	private Integer numero;
	private Integer anyo;

	public FacturaId() {
	}

	public FacturaId(Integer numero, Integer anyo) {
		this.numero = numero;
		this.anyo = anyo;
	}

	public Integer getNumero() {
		return this.numero;
	}

	public void setNumero(Integer numero) {
		this.numero = numero;
	}

	public Integer getAnyo() {
		return this.anyo;
	}

	public void setAnyo(Integer anyo) {
		this.anyo = anyo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FacturaId))
			return false;
		FacturaId castOther = (FacturaId) other;

		return ((this.getNumero() == castOther.getNumero()) || (this
				.getNumero() != null
				&& castOther.getNumero() != null && this.getNumero().equals(
				castOther.getNumero())))
				&& ((this.getAnyo() == castOther.getAnyo()) || (this.getAnyo() != null
						&& castOther.getAnyo() != null && this.getAnyo()
						.equals(castOther.getAnyo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getNumero() == null ? 0 : this.getNumero().hashCode());
		result = 37 * result
				+ (getAnyo() == null ? 0 : this.getAnyo().hashCode());
		return result;
	}

}
