Beispiel #1
0
  @Override
  public Object clone() {
    GioiTinhClp clone = new GioiTinhClp();

    clone.setId(getId());
    clone.setTen(getTen());
    clone.setMa(getMa());
    clone.setNgayTao(getNgayTao());
    clone.setNguoiTao(getNguoiTao());
    clone.setNgaySua(getNgaySua());
    clone.setNguoiSua(getNguoiSua());
    clone.setDaXoa(getDaXoa());

    return clone;
  }
Beispiel #2
0
  @Override
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    GioiTinhClp gioiTinh = null;

    try {
      gioiTinh = (GioiTinhClp) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    long primaryKey = gioiTinh.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }