code: public NumberedReservationId generateReservationIdentifier(ChargingStationId chargingStationId, String protocolIdentifier) {
          ReservationIdentifier reservationIdentifier = new ReservationIdentifier();
  
          reservationIdentifierRepository.insert(reservationIdentifier);
  
          /* TODO JPA's identity generator creates longs, while OCPP and Motown supports ints. Where should we translate
           * between these and how should we handle error cases? - Mark van den Bergh, Januari 7th 2013
           */
          Long identifier = (Long) entityManagerFactory.getPersistenceUnitUtil().getIdentifier(reservationIdentifier);
          return new NumberedReservationId(chargingStationId, protocolIdentifier, identifier.intValue());
      }
docs: Generates a reservation identifier based on the charging station, the module (OCPP) and a auto-incremented number.
  
  @param chargingStationId  charging station identifier to use when generating a reservation identifier.
  @param protocolIdentifier identifier of the protocol, used when generating a reservation identifier.
  @return reservation identifier based on the charging station, module and auto-incremented number.