package Dataset;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;

/**
 * @author alexis
 * dataset de la table location_chambre
 */
public class location_chambre extends vente implements Serializable{
	private int chambre_fk_id;
	private BigDecimal location_chambre_prix;

	/**************************************************************************
	 * constructeur
	 *************************************************************************/
	
	public location_chambre(int vente_id, Date vente_heure, Date vente_jour, int facture_fk_id,
							int chambre_fk_id, BigDecimal location_chambre_prix) {
		super(vente_id, vente_heure, vente_jour, facture_fk_id);
		this.chambre_fk_id = chambre_fk_id;
		this.location_chambre_prix = location_chambre_prix;
	}

	/**************************************************************************
	 * getter
	 *************************************************************************/
	
	/**
	 * @return the chambre_fk_id
	 */
	public int getChambre_fk_id() {
		return chambre_fk_id;
	}

	/**
	 * @return the location_chambre_prix
	 */
	public BigDecimal getLocation_chambre_prix() {
		return location_chambre_prix;
	}

	/**************************************************************************
	 * setter
	 *************************************************************************/
	
	/**
	 * @param chambre_fk_id the chambre_fk_id to set
	 */
	public void setChambre_fk_id(int chambre_fk_id) {
		this.chambre_fk_id = chambre_fk_id;
	}

	/**
	 * @param location_chambre_prix the location_chambre_prix to set
	 */
	public void setLocation_chambre_prix(BigDecimal location_chambre_prix) {
		this.location_chambre_prix = location_chambre_prix;
	}



	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "location_chambre [chambre_fk_id=" + chambre_fk_id
				+ ", location_chambre_prix=" + location_chambre_prix
				+ ", getvente_p_id()=" + getvente_p_id()
				+ ", getVente_heure()=" + getVente_heure()
				+ ", getVente_jour()=" + getVente_jour()
				+ ", getFacture_fk_id()=" + getFacture_fk_id() + "]";
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + chambre_fk_id;
		result = prime
				* result
				+ ((location_chambre_prix == null) ? 0 : location_chambre_prix
						.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (!(obj instanceof location_chambre))
			return false;
		location_chambre other = (location_chambre) obj;
		if (chambre_fk_id != other.chambre_fk_id)
			return false;
		if (location_chambre_prix == null) {
			if (other.location_chambre_prix != null)
				return false;
		} else if (!location_chambre_prix.equals(other.location_chambre_prix))
			return false;
		return true;
	}

	
}
