@Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (!(obj instanceof KaleoTaskAssignmentInstance)) {
      return false;
    }

    KaleoTaskAssignmentInstance kaleoTaskAssignmentInstance = (KaleoTaskAssignmentInstance) obj;

    long primaryKey = kaleoTaskAssignmentInstance.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
  @Override
  public int compareTo(KaleoTaskAssignmentInstance kaleoTaskAssignmentInstance) {
    int value = 0;

    if (getKaleoTaskAssignmentInstanceId()
        < kaleoTaskAssignmentInstance.getKaleoTaskAssignmentInstanceId()) {
      value = -1;
    } else if (getKaleoTaskAssignmentInstanceId()
        > kaleoTaskAssignmentInstance.getKaleoTaskAssignmentInstanceId()) {
      value = 1;
    } else {
      value = 0;
    }

    if (value != 0) {
      return value;
    }

    return 0;
  }