package Dataset;

import java.io.Serializable;

/**
 * @author alexis
 * dataset de la table telephone
 */
public class telephone implements Serializable {
	private int telephone_p_id;
	private String telephone_type;
	private String telephone_numero;
	private int client_fk_id;

	/**************************************************************************
	 * constructeur
	 *************************************************************************/
	
	public telephone(int telephone_p_id, String telephone_type,
					 String telephone_numero, int client_fk_id) {
		this.telephone_p_id = telephone_p_id;
		this.telephone_type = telephone_type;
		this.telephone_numero = telephone_numero;
		this.client_fk_id = client_fk_id;
	}

	/**************************************************************************
	 * getter
	 *************************************************************************/
	
	/**
	 * @return the telephone_p_id
	 */
	public int gettelephone_p_id() {
		return telephone_p_id;
	}

	/**
	 * @return the telephone_type
	 */
	public String getTelephone_type() {
		return telephone_type;
	}

	/**
	 * @return the telephone_numero
	 */
	public String getTelephone_numero() {
		return telephone_numero;
	}

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

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

	/**
	 * @param telephone_type the telephone_type to set
	 */
	public void setTelephone_type(String telephone_type) {
		this.telephone_type = telephone_type;
	}

	/**
	 * @param telephone_numero the telephone_numero to set
	 */
	public void setTelephone_numero(String telephone_numero) {
		this.telephone_numero = telephone_numero;
	}

	/**
	 * @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 "telephone [telephone_p_id=" + telephone_p_id
				+ ", telephone_type=" + telephone_type + ", telephone_numero="
				+ telephone_numero + ", client_fk_id=" + client_fk_id + "]";
	}

	/* (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
				+ ((telephone_numero == null) ? 0 : telephone_numero.hashCode());
		result = prime * result + telephone_p_id;
		result = prime * result
				+ ((telephone_type == null) ? 0 : telephone_type.hashCode());
		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 telephone))
			return false;
		telephone other = (telephone) obj;
		if (client_fk_id != other.client_fk_id)
			return false;
		if (telephone_numero == null) {
			if (other.telephone_numero != null)
				return false;
		} else if (!telephone_numero.equals(other.telephone_numero))
			return false;
		if (telephone_p_id != other.telephone_p_id)
			return false;
		if (telephone_type == null) {
			if (other.telephone_type != null)
				return false;
		} else if (!telephone_type.equals(other.telephone_type))
			return false;
		return true;
	}
	
	
}
