package Model;
// Generated 2 juin 2010 09:54:13 by Hibernate Tools 3.2.4.GA

/**
 * VEtudiantId generated by hbm2java
 */
public class VEtudiantId implements java.io.Serializable 
{
	private static final long serialVersionUID = 1L;
	private String nom;
	private String prenom;
	private long ageCarre;

	public VEtudiantId() {
	}

	public VEtudiantId(String nom, String prenom, long ageCarre) {
		this.nom = nom;
		this.prenom = prenom;
		this.ageCarre = ageCarre;
	}

	public String getNom() {
		return this.nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return this.prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public long getAgeCarre() {
		return this.ageCarre;
	}

	public void setAgeCarre(long ageCarre) {
		this.ageCarre = ageCarre;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof VEtudiantId))
			return false;
		VEtudiantId castOther = (VEtudiantId) other;

		return ((this.getNom() == castOther.getNom()) || (this.getNom() != null
				&& castOther.getNom() != null && this.getNom().equals(
				castOther.getNom())))
				&& ((this.getPrenom() == castOther.getPrenom()) || (this
						.getPrenom() != null
						&& castOther.getPrenom() != null && this.getPrenom()
						.equals(castOther.getPrenom())))
				&& (this.getAgeCarre() == castOther.getAgeCarre());
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getNom() == null ? 0 : this.getNom().hashCode());
		result = 37 * result
				+ (getPrenom() == null ? 0 : this.getPrenom().hashCode());
		result = 37 * result + (int) this.getAgeCarre();
		return result;
	}

	public String toString()
	{
		return this.nom + " " + this.prenom + " ,ageČ = " + this.ageCarre;
	}
}
