public int compareTo(HRTaskStatus hrTaskStatus) {
    long primaryKey = hrTaskStatus.getPrimaryKey();

    if (getPrimaryKey() < primaryKey) {
      return -1;
    } else if (getPrimaryKey() > primaryKey) {
      return 1;
    } else {
      return 0;
    }
  }
  @Override
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    HRTaskStatus hrTaskStatus = null;

    try {
      hrTaskStatus = (HRTaskStatus) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    long primaryKey = hrTaskStatus.getPrimaryKey();

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