package database.dataset;

import java.io.Serializable;

/**
 * @author alexis
 * dataset de la table status
 */
public class Status_chambre implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 169306374453321780L;
	private int status_p_id;
	private String status_description;
	private final String NOM_TABLE = "status";
	
	/**************************************************************************
	 * constructeur
	 *************************************************************************/
	
	public Status_chambre(int status_p_id, String status_description) {
		this.status_p_id = status_p_id;
		this.status_description = status_description;
	}
	
	/**************************************************************************
	 * getter
	 *************************************************************************/

	/**
	 * @return the status_p_id
	 */
	public int getStatus_p_id() {
		return status_p_id;
	}

	/**
	 * @return the status_description
	 */
	public String getStatus_description() {
		return status_description;
	}
	
	/**
	 * Retourne le nom de la table
	 * @return NOM_TABLE
	 */
	public String getNomTable()
	{
		return NOM_TABLE;		
	}
	
	/**************************************************************************
	 * setter
	 *************************************************************************/

	/**
	 * @param status_p_id the status_p_id to set
	 */
	public void setStatus_p_id(int status_p_id) {
		this.status_p_id = status_p_id;
	}

	/**
	 * @param status_description the status_description to set
	 */
	public void setStatus_description(String status_description) {
		this.status_description = status_description;
	}
	
	/**************************************************************************
	 * object
	 *************************************************************************/

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "status [status_p_id=" + status_p_id + ", status_description="
				+ status_description + "]";
	}

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

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Status_chambre other = (Status_chambre) obj;
		if (status_description == null) {
			if (other.status_description != null)
				return false;
		} else if (!status_description.equals(other.status_description))
			return false;
		if (status_p_id != other.status_p_id)
			return false;
		return true;
	}
}