content: package com.alipay.simplehbase.myrecord;
  
  import java.io.Serializable;
  import java.util.Date;
  
  import org.apache.commons.lang.builder.EqualsBuilder;
  import org.apache.commons.lang.builder.HashCodeBuilder;
  import org.apache.commons.lang.builder.ToStringBuilder;
  
  import com.alipay.simplehbase.client.RowKey;
  
  /**
   * Use as example to show use reflection to find JOPO's family and qualifier.
   * 
   * @author xinzhi
   */
  public class MyRecordV2 implements Serializable {
  
      private static final long serialVersionUID = 1L;
  
      private int               id;
  
      private String            name;
  
      private Date              date;
  
      private Gender            gender;
  
      private long              age;
  
      public RowKey rowKey() {
          return new MyRecordRowKey(id);
      }
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public Date getDate() {
          return date;
      }
  
      public void setDate(Date date) {
          this.date = date;
      }
  
      public Gender getGender() {
          return gender;
      }
  
      public void setGender(Gender gender) {
          this.gender = gender;
      }
  
      public long getAge() {
          return age;
      }
  
      public void setAge(long age) {
          this.age = age;
      }
  
      @Override
      public boolean equals(Object obj) {
          return EqualsBuilder.reflectionEquals(this, obj);
      }
  
      @Override
      public int hashCode() {
          return HashCodeBuilder.reflectionHashCode(this);
      }
  
      @Override
      public String toString() {
          return ToStringBuilder.reflectionToString(this);
      }
  }
  