package west.pharmacie.dto.base; import java.io.Serializable; /** * This is an object that contains data related to the fournisseur table. * Do not modify this class because it will be overwritten if the configuration file * related to this class is modified. * * @hibernate.class * table="fournisseur" */ public abstract class BaseFournisseur implements Serializable { public static String REF = "Fournisseur"; public static String PROP_ADRESSE = "Adresse"; public static String PROP_TEL = "Tel"; public static String PROP_VILLE = "Ville"; public static String PROP_RAISON_SOCIALE = "RaisonSociale"; public static String PROP_ID = "Id"; // constructors public BaseFournisseur () { initialize(); } /** * Constructor for primary key */ public BaseFournisseur (java.lang.Integer id) { this.setId(id); initialize(); } protected void initialize () {} private int hashCode = Integer.MIN_VALUE; // primary key private java.lang.Integer id; // fields private java.lang.String raisonSociale; private java.lang.String adresse; private java.lang.String ville; private java.lang.String tel; // collections private java.util.Set lotstocks; /** * Return the unique identifier of this class * @hibernate.id * generator-class="increment" * column="CodeFournisseur" */ public java.lang.Integer getId () { return id; } /** * Set the unique identifier of this class * @param id the new ID */ public void setId (java.lang.Integer id) { this.id = id; this.hashCode = Integer.MIN_VALUE; } /** * Return the value associated with the column: RaisonSociale */ public java.lang.String getRaisonSociale () { return raisonSociale; } /** * Set the value related to the column: RaisonSociale * @param raisonSociale the RaisonSociale value */ public void setRaisonSociale (java.lang.String raisonSociale) { this.raisonSociale = raisonSociale; } /** * Return the value associated with the column: Adresse */ public java.lang.String getAdresse () { return adresse; } /** * Set the value related to the column: Adresse * @param adresse the Adresse value */ public void setAdresse (java.lang.String adresse) { this.adresse = adresse; } /** * Return the value associated with the column: Ville */ public java.lang.String getVille () { return ville; } /** * Set the value related to the column: Ville * @param ville the Ville value */ public void setVille (java.lang.String ville) { this.ville = ville; } /** * Return the value associated with the column: TEL */ public java.lang.String getTel () { return tel; } /** * Set the value related to the column: TEL * @param tel the TEL value */ public void setTel (java.lang.String tel) { this.tel = tel; } /** * Return the value associated with the column: Lotstocks */ public java.util.Set getLotstocks () { return lotstocks; } /** * Set the value related to the column: Lotstocks * @param lotstocks the Lotstocks value */ public void setLotstocks (java.util.Set lotstocks) { this.lotstocks = lotstocks; } public void addToLotstocks (west.pharmacie.dto.Lotstock lotstock) { if (null == getLotstocks()) setLotstocks(new java.util.TreeSet()); getLotstocks().add(lotstock); } public boolean equals (Object obj) { if (null == obj) return false; if (!(obj instanceof west.pharmacie.dto.Fournisseur)) return false; else { west.pharmacie.dto.Fournisseur fournisseur = (west.pharmacie.dto.Fournisseur) obj; if (null == this.getId() || null == fournisseur.getId()) return false; else return (this.getId().equals(fournisseur.getId())); } } public int hashCode () { if (Integer.MIN_VALUE == this.hashCode) { if (null == this.getId()) return super.hashCode(); else { String hashStr = this.getClass().getName() + ":" + this.getId().hashCode(); this.hashCode = hashStr.hashCode(); } } return this.hashCode; } public String toString () { return super.toString(); } }