CampaignId  
package com.hibernate.pojo;/**
 * CampaignId generated by MyEclipse - Hibernate Tools
 */public class CampaignId  implements java.io.Serializable {
    // Fields         private long id;
     private String name;
    // Constructors    /** default constructor */
    public CampaignId() {
    }    
    /** full constructor */
    public CampaignId(long id, String name) {
        this.id = id;
        this.name = name;
    }
       
    // Property accessors    public long getId() {
        return this.id;
    }
    
    public void setId(long id) {
        this.id = id;
    }    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
      public boolean equals(Object other) {
         if ( (this == other ) ) return true;
 if ( (other == null ) ) return false;
 if ( !(other instanceof CampaignId) ) return false;
 CampaignId castOther = ( CampaignId ) other; 
         
 return (this.getId()==castOther.getId())
 && ( (this.getName()==castOther.getName()) || ( this.getName()!=null && castOther.getName()!=null && this.getName().equals(castOther.getName()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + (int) this.getId();
         result = 37 * result + ( getName() == null ? 0 : this.getName().hashCode() );
         return result;
   }   }
这个类自动生成的