package database.dataset;

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

/**
 * @author alexis
 * dataset de la table vente_article
 */
public class Vente_article extends Vente implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -2328928130801370792L;
	private int vente_article_quantite;

	/**************************************************************************
	 * constructeur
	 *************************************************************************/
	
	public Vente_article(int vente_id, Time vente_heure, Date vente_jour, 
						 BigDecimal vente_prix, int facture_fk_id,
					     int article_fk_id, int vente_article_quantite) {
		super(vente_id, vente_heure, vente_jour, vente_prix, facture_fk_id, article_fk_id);
		this.vente_article_quantite = vente_article_quantite;
	}

	/**************************************************************************
	 * getter
	 *************************************************************************/
	
	/**
	 * @return the vente_article_quantite
	 */
	public int getVente_article_quantite() {
		return vente_article_quantite;
	}

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

	/**************************************************************************
	 * object
	 *************************************************************************/
	
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "vente_article [" 
				+ ", vente_article_quantite=" + vente_article_quantite
				+ ", 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 + vente_article_quantite;
		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;
		Vente_article other = (Vente_article) obj;
		if (vente_article_quantite != other.vente_article_quantite)
			return false;
		return true;
	}
}