@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; }
@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; } }