package Dataset;

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

/**
 * @author alexis
 * dataset de la table facture
 */
public class facture implements Serializable {
	private int facture_p_id;
	private int client_fk_id;
	private int fermeture_fk_id;
	private String facture_commentaire;
	private int taxe_fk_id;
	private Date facture_jour;
	private Date facture_heure;

	/**************************************************************************
	 * constructeur
	 *************************************************************************/
	
	public facture(int facture_p_id, int client_fk_id, int fermeture_fk_id,
				   String facture_commentaire, int taxe_fk_id, Date facture_jour, Date facture_heure) {
		this.facture_p_id = facture_p_id;
		this.client_fk_id = client_fk_id;
		this.fermeture_fk_id = fermeture_fk_id;
		this.facture_commentaire = facture_commentaire;
		this.taxe_fk_id = taxe_fk_id;
		this.facture_jour = facture_jour;
		this.facture_heure = facture_heure;
	}

	/**************************************************************************
	 * getter
	 *************************************************************************/
	
	/**
	 * @return the facture_p_id
	 */
	public int getfacture_p_id() {
		return facture_p_id;
	}
	
	/**
	 * @return the client_fk_id
	 */
	public int getClient_fk_id() {
		return client_fk_id;
	}
	
	/**
	 * @return the fermeture_fk_id
	 */
	public int getFermeture_fk_id() {
		return fermeture_fk_id;
	}
	
	/**
	 * @return the facture_commentaire
	 */
	public String getFacture_commentaire() {
		return facture_commentaire;
	}
	
	/**
	 * @return the taxe_fk_id
	 */
	public int getTaxe_fk_id() {
		return taxe_fk_id;
	}
	
	/**
	 * @return the facture_jour
	 */
	public Date getFacture_jour() {
		return facture_jour;
	}
	
	/**
	 * @return the facture_heure
	 */
	public Date getFacture_heure() {
		return facture_heure;
	}

	/**************************************************************************
	 * setter
	 *************************************************************************/
	
	/**
	 * @param facture_p_id the facture_p_id to set
	 */
	public void setfacture_p_id(int facture_p_id) {
		this.facture_p_id = facture_p_id;
	}
	
	/**
	 * @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;
	}
	
	/**
	 * @param fermeture_fk_id the fermeture_fk_id to set
	 */
	public void setFermeture_fk_id(int fermeture_fk_id) {
		this.fermeture_fk_id = fermeture_fk_id;
	}
	
	/**
	 * @param facture_commentaire the facture_commentaire to set
	 */
	public void setFacture_commentaire(String facture_commentaire) {
		this.facture_commentaire = facture_commentaire;
	}
	
	/**
	 * @param taxe_fk_id the taxe_fk_id to set
	 */
	public void setTaxe_fk_id(int taxe_fk_id) {
		this.taxe_fk_id = taxe_fk_id;
	}
	
	/**
	 * @param facture_jour the facture_jour to set
	 */
	public void setFacture_jour(Date facture_jour) {
		this.facture_jour = facture_jour;
	}
	
	/**
	 * @param facture_jour the facture_jour to set
	 */
	public void setFacture_heure(Date facture_heure) {
		this.facture_heure = facture_heure;
	}

	/**************************************************************************
	 * object
	 *************************************************************************/
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "facture [facture_p_id=" + facture_p_id + ", client_fk_id="
				+ client_fk_id + ", fermeture_fk_id=" + fermeture_fk_id
				+ ", facture_commentaire=" + facture_commentaire
				+ ", taxe_fk_id=" + taxe_fk_id + ", facture_jour="
				+ facture_jour + ", facture_heure=" + facture_heure + "]";
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + client_fk_id;
		result = prime
				* result
				+ ((facture_commentaire == null) ? 0 : facture_commentaire
						.hashCode());
		result = prime * result
				+ ((facture_heure == null) ? 0 : facture_heure.hashCode());
		result = prime * result
				+ ((facture_jour == null) ? 0 : facture_jour.hashCode());
		result = prime * result + facture_p_id;
		result = prime * result + fermeture_fk_id;
		result = prime * result + taxe_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 (obj == null)
			return false;
		if (!(obj instanceof facture))
			return false;
		facture other = (facture) obj;
		if (client_fk_id != other.client_fk_id)
			return false;
		if (facture_commentaire == null) {
			if (other.facture_commentaire != null)
				return false;
		} else if (!facture_commentaire.equals(other.facture_commentaire))
			return false;
		if (facture_heure == null) {
			if (other.facture_heure != null)
				return false;
		} else if (!facture_heure.equals(other.facture_heure))
			return false;
		if (facture_jour == null) {
			if (other.facture_jour != null)
				return false;
		} else if (!facture_jour.equals(other.facture_jour))
			return false;
		if (facture_p_id != other.facture_p_id)
			return false;
		if (fermeture_fk_id != other.fermeture_fk_id)
			return false;
		if (taxe_fk_id != other.taxe_fk_id)
			return false;
		return true;
	}
	
	
}
