package database.dataset;

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

/**
 * @author alexis
 * dataset de la table reservation_individu
 */
public class Reservation_individu extends Reservation implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5436730709323769694L;
	private int client_fk_id;
	
	/**************************************************************************
	 * constructeur
	 *************************************************************************/
	
	public Reservation_individu(int reservation_p_id, int chambre_fk_id, 
			                    Date reservation_debut, Date reservation_fin, 
			                    String reservation_commentaire, int status_fk_id, 
			                    int client_fk_id) {
		
		super(reservation_p_id, chambre_fk_id, reservation_debut, reservation_fin, 
			  reservation_commentaire, status_fk_id);
		
		this.client_fk_id = client_fk_id;
	}
	
	/**************************************************************************
	 * getter
	 *************************************************************************/

	/**
	 * @return the client_fk_id
	 */
	public int getClient_fk_id() {
		return client_fk_id;
	}
	
	/**************************************************************************
	 * setter
	 *************************************************************************/

	/**
	 * @param client_fk_id the client_fk_id to set
	 */
	public void setClient_fk_id(int client_fk_id) {
		this.client_fk_id = client_fk_id;
	}
	
	/**************************************************************************
	 * object
	 *************************************************************************/

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

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + client_fk_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 (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Reservation_individu other = (Reservation_individu) obj;
		if (client_fk_id != other.client_fk_id)
			return false;
		return true;
	}
}