code: public ApiKey regenerateApiKey(final ApiKey apiKey) {
          pm.currentTransaction().begin();
          apiKey.setKey(ApiKeyGenerator.generate());
          pm.currentTransaction().commit();
          return pm.getObjectById(ApiKey.class, apiKey.getId());
      }
docs: Regenerates an API key. This method does not create a new ApiKey object,
  rather it uses the existing ApiKey object and simply creates a new
  key string.
  @param apiKey the ApiKey object to regenerate the key of.
  @return an ApiKey
  @since 1.0.0