@Override
  public int compareTo(AppRole2Employee appRole2Employee) {
    long primaryKey = appRole2Employee.getPrimaryKey();

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

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

    AppRole2Employee appRole2Employee = (AppRole2Employee) obj;

    long primaryKey = appRole2Employee.getPrimaryKey();

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