package es.dalocar.software.beans;

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

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

	private Integer numerolinea;
	private Integer numerofactura;
	private Integer anyofactura;

	public LineaFacturaId() {
	}

	public LineaFacturaId(Integer numerolinea, Integer numerofactura,
			Integer anyofactura) {
		this.numerolinea = numerolinea;
		this.numerofactura = numerofactura;
		this.anyofactura = anyofactura;
	}

	public Integer getNumerolinea() {
		return this.numerolinea;
	}

	public void setNumerolinea(Integer numerolinea) {
		this.numerolinea = numerolinea;
	}

	public Integer getNumerofactura() {
		return this.numerofactura;
	}

	public void setNumerofactura(Integer numerofactura) {
		this.numerofactura = numerofactura;
	}

	public Integer getAnyofactura() {
		return this.anyofactura;
	}

	public void setAnyofactura(Integer anyofactura) {
		this.anyofactura = anyofactura;
	}

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

		return ((this.getNumerolinea() == castOther.getNumerolinea()) || (this
				.getNumerolinea() != null
				&& castOther.getNumerolinea() != null && this.getNumerolinea()
				.equals(castOther.getNumerolinea())))
				&& ((this.getNumerofactura() == castOther.getNumerofactura()) || (this
						.getNumerofactura() != null
						&& castOther.getNumerofactura() != null && this
						.getNumerofactura()
						.equals(castOther.getNumerofactura())))
				&& ((this.getAnyofactura() == castOther.getAnyofactura()) || (this
						.getAnyofactura() != null
						&& castOther.getAnyofactura() != null && this
						.getAnyofactura().equals(castOther.getAnyofactura())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getNumerolinea() == null ? 0 : this.getNumerolinea()
						.hashCode());
		result = 37
				* result
				+ (getNumerofactura() == null ? 0 : this.getNumerofactura()
						.hashCode());
		result = 37
				* result
				+ (getAnyofactura() == null ? 0 : this.getAnyofactura()
						.hashCode());
		return result;
	}

}
