Leads.java

00001 
00025 package org.openmobileis.examples.mycrm.data;
00026 
00027 import java.io.Serializable;
00028 import java.util.Date;
00029 
00030 public final class Leads implements Serializable {
00031   //add serial version to avoid serialization error if the version change
00032   // without class change. 
00033   static final long serialVersionUID = 5521257935120563452L;
00034 
00035   //define the category for all state label in LabelManager
00036   public static final String LEADS_STATE_LABEL_CATEGORY = "3";
00037   private String id;
00038   private String idaccount;
00039   private int state, amount;
00040   private Date closeDate;
00041   private String description;
00042   
00043   public Leads(String id) {
00044     super();
00045     this.id = id;
00046     closeDate = new Date();
00047   }
00048 
00049   public int getAmount() {
00050     return amount;
00051   }
00052 
00053   public void setAmount(int amount) {
00054     this.amount = amount;
00055   }
00056 
00057   public String getDescription() {
00058     return description;
00059   }
00060 
00061   public void setDescription(String description) {
00062     this.description = description;
00063   }
00064 
00065   public Date getCloseDate() {
00066     return closeDate;
00067   }
00068 
00069   public void setCloseDate(Date closeDate) {
00070     this.closeDate = closeDate;
00071   }
00072 
00073   public int getState() {
00074     return state;
00075   }
00076 
00077   public void setState(int state) {
00078     this.state = state;
00079   }
00080 
00081   public String getId() {
00082     return id;
00083   }
00084   
00085   public boolean equals(Object obj)   {
00086       if (this.id.equals(((Leads)obj).id))    {
00087           return true;
00088       }
00089       return false;
00090   }
00091   
00092   public int hashCode()   {
00093       return this.id.hashCode();
00094   }
00095 
00096   public String getIdaccount() {
00097     return idaccount;
00098   }
00099 
00100   public void setIdaccount(String idaccount) {
00101     this.idaccount = idaccount;
00102   }
00103 
00104 }

Generated on Mon Dec 4 11:03:27 2006 for OpenMobileIS by  doxygen 1.5.1-p1