package database.dataview;

import java.sql.ResultSet;

import tool.regEx.Adresse;

public class view_client {
	private final int client_p_id;
	private final String client_nom;
    private final String client_prenom;
    private final String client_commentaire;
    private final int adresse_p_id;
    private final String adresse_no_rue_app;
    private final String adresse_codepostal;
    private final int ville_p_id;
    private final String ville_nom;
    private final String province;
    private final String pays;
	/**
	 * @param client_p_id
	 * @param client_nom
	 * @param client_prenom
	 * @param client_commentaire
	 * @param adresse_p_id
	 * @param adresse_no_rue_app
	 * @param adresse_codepostal
	 * @param ville_p_id
	 * @param ville_nom
	 * @param province
	 * @param pays
	 */
	public view_client(int client_p_id, String client_nom,
			String client_prenom, String client_commentaire, int adresse_p_id,
			String adresse_no_rue_app, String adresse_codepostal,
			int ville_p_id, String ville_nom, String province, String pays) {
		super();
		this.client_p_id = client_p_id;
		this.client_nom = client_nom;
		this.client_prenom = client_prenom;
		this.client_commentaire = client_commentaire;
		this.adresse_p_id = adresse_p_id;
		this.adresse_no_rue_app = adresse_no_rue_app;
		this.adresse_codepostal = adresse_codepostal;
		this.ville_p_id = ville_p_id;
		this.ville_nom = ville_nom;
		this.province = province;
		this.pays = pays;
	}
	/**
	 * @return the client_p_id
	 */
	public int getClient_p_id() {
		return client_p_id;
	}
	/**
	 * @return the client_nom
	 */
	public String getClient_nom() {
		return client_nom;
	}
	/**
	 * @return the client_prenom
	 */
	public String getClient_prenom() {
		return client_prenom;
	}
	/**
	 * @return the client_commentaire
	 */
	public String getClient_commentaire() {
		return client_commentaire;
	}
	/**
	 * @return the adresse_p_id
	 */
	public int getAdresse_p_id() {
		return adresse_p_id;
	}
	/**
	 * @return the adresse_no_rue_app
	 */
	public String getAdresse_no_rue_app() {
		return adresse_no_rue_app;
	}
	/**
	 * @return the adresse_codepostal
	 */
	public String getAdresse_codepostal() {
		return adresse_codepostal;
	}
	/**
	 * @return the ville_p_id
	 */
	public int getVille_p_id() {
		return ville_p_id;
	}
	/**
	 * @return the ville_nom
	 */
	public String getVille_nom() {
		return ville_nom;
	}
	/**
	 * @return the province
	 */
	public String getProvince() {
		return province;
	}
	/**
	 * @return the pays
	 */
	public String getPays() {
		return pays;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((adresse_codepostal == null) ? 0 : adresse_codepostal
						.hashCode());
		result = prime
				* result
				+ ((adresse_no_rue_app == null) ? 0 : adresse_no_rue_app
						.hashCode());
		result = prime * result + adresse_p_id;
		result = prime
				* result
				+ ((client_commentaire == null) ? 0 : client_commentaire
						.hashCode());
		result = prime * result
				+ ((client_nom == null) ? 0 : client_nom.hashCode());
		result = prime * result + client_p_id;
		result = prime * result
				+ ((client_prenom == null) ? 0 : client_prenom.hashCode());
		result = prime * result + ((pays == null) ? 0 : pays.hashCode());
		result = prime * result
				+ ((province == null) ? 0 : province.hashCode());
		result = prime * result
				+ ((ville_nom == null) ? 0 : ville_nom.hashCode());
		result = prime * result + ville_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;
		view_client other = (view_client) obj;
		if (adresse_codepostal == null) {
			if (other.adresse_codepostal != null)
				return false;
		} else if (!adresse_codepostal.equals(other.adresse_codepostal))
			return false;
		if (adresse_no_rue_app == null) {
			if (other.adresse_no_rue_app != null)
				return false;
		} else if (!adresse_no_rue_app.equals(other.adresse_no_rue_app))
			return false;
		if (adresse_p_id != other.adresse_p_id)
			return false;
		if (client_commentaire == null) {
			if (other.client_commentaire != null)
				return false;
		} else if (!client_commentaire.equals(other.client_commentaire))
			return false;
		if (client_nom == null) {
			if (other.client_nom != null)
				return false;
		} else if (!client_nom.equals(other.client_nom))
			return false;
		if (client_p_id != other.client_p_id)
			return false;
		if (client_prenom == null) {
			if (other.client_prenom != null)
				return false;
		} else if (!client_prenom.equals(other.client_prenom))
			return false;
		if (pays == null) {
			if (other.pays != null)
				return false;
		} else if (!pays.equals(other.pays))
			return false;
		if (province == null) {
			if (other.province != null)
				return false;
		} else if (!province.equals(other.province))
			return false;
		if (ville_nom == null) {
			if (other.ville_nom != null)
				return false;
		} else if (!ville_nom.equals(other.ville_nom))
			return false;
		if (ville_p_id != other.ville_p_id)
			return false;
		return true;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "view_client [client_p_id=" + client_p_id + ", client_nom="
				+ client_nom + ", client_prenom=" + client_prenom
				+ ", client_commentaire=" + client_commentaire
				+ ", adresse_p_id=" + adresse_p_id + ", adresse_no_rue_app="
				+ adresse_no_rue_app + ", adresse_codepostal="
				+ adresse_codepostal + ", ville_p_id=" + ville_p_id
				+ ", ville_nom=" + ville_nom + ", province=" + province
				+ ", pays=" + pays + "]";
	}

}
