package database.dataset;

import java.io.Serializable;

/**
 * @author alexis
 * dataset de la table chambre
 */

	/**************************************************************************
	 * constructeur
	 *************************************************************************/

	public class Chambre implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1531593898794939479L;
	private int chambre_p_id;
	private int chambre_nombredelits;
	private boolean chambre_devantlhotel;
	private int chambre_nombreEtage;
	private String chambre_description;
	private int chambre_numero;
	private final String NOM_TABLE = "chambre";
	
	public Chambre(int chambre_p_id, int chambre_nombredelits,
			boolean chambre_devantlhotel, int chambre_nombreEtage,
			String chambre_description, int chambre_numero) {
		this.chambre_p_id = chambre_p_id;
		this.chambre_nombredelits = chambre_nombredelits;
		this.chambre_devantlhotel = chambre_devantlhotel;
		this.chambre_nombreEtage = chambre_nombreEtage;
		this.chambre_description = chambre_description;
		this.chambre_numero = chambre_numero;
	}


	
	/**************************************************************************
	 * getter
	 *************************************************************************/
	public int getChambre_p_id() {
		return chambre_p_id;
	}
	public int getChambre_nombredelits() {
		return chambre_nombredelits;
	}
	public boolean isChambre_devantlhotel() {
		return chambre_devantlhotel;
	}
	public int getChambre_nombreEtage() {
		return chambre_nombreEtage;
	}
	public String getChambre_description() {
		return chambre_description;
	}
	public int getChambre_numero() {
		return chambre_numero;
	}

    
	/**
	 * Retourne le nom de la table
	 * @return NOM_TABLE
	 */
	public String getNomTable()
	{
		return NOM_TABLE;		
	}
	
	/**************************************************************************
	 * setter
	 *************************************************************************/
	public void setChambre_p_id(int chambre_p_id) {
		this.chambre_p_id = chambre_p_id;
	}
	public void setChambre_nombredelits(int chambre_nombredelits) {
		this.chambre_nombredelits = chambre_nombredelits;
	}
	public void setChambre_devantlhotel(boolean chambre_devantlhotel) {
		this.chambre_devantlhotel = chambre_devantlhotel;
	}
	public void setChambre_nombreEtage(int chambre_nombreEtage) {
		this.chambre_nombreEtage = chambre_nombreEtage;
	}
	public void setChambre_description(String chambre_description) {
		this.chambre_description = chambre_description;
	}
	public void setChambre_numero(int chambre_numero) {
		this.chambre_numero = chambre_numero;
	}

	/**************************************************************************
	 * object
	 *************************************************************************/

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((chambre_description == null) ? 0 : chambre_description
		                
						.hashCode());
		result = prime * result + (chambre_devantlhotel ? 1231 : 1237);
		result = prime * result + chambre_nombreEtage;
		result = prime * result + chambre_nombredelits;
		result = prime * result + chambre_numero;
		result = prime * result + chambre_p_id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Chambre other = (Chambre) obj;
		if (chambre_description == null) {
			if (other.chambre_description != null)
				return false;
		} else if (!chambre_description.equals(other.chambre_description))
			return false;
		if (chambre_devantlhotel != other.chambre_devantlhotel)
			return false;
		if (chambre_nombreEtage != other.chambre_nombreEtage)
			return false;
		if (chambre_nombredelits != other.chambre_nombredelits)
			return false;
		if (chambre_numero != other.chambre_numero)
			return false;
		if (chambre_p_id != other.chambre_p_id)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "chambre [chambre_p_id=" + chambre_p_id
				+ ", chambre_nombredelits=" + chambre_nombredelits
				+ ", chambre_devantlhotel=" + chambre_devantlhotel
				+ ", chambre_nombreEtage=" + chambre_nombreEtage
				+ ", chambre_description=" + chambre_description
				+ ", chambre_numero=" + chambre_numero + "]";
	}
}