code: private Key[] longListToNativeKeys(Class<?> entityClass, List<Long> identifiers) {
      if (identifiers == null || identifiers.isEmpty()) {
        return new Key[0];
      }
      EntityMetadata entityMetadata = EntityIntrospector.introspect(entityClass);
      Key[] nativeKeys = new Key[identifiers.size()];
      KeyFactory keyFactory = entityManager.newNativeKeyFactory();
      keyFactory.setKind(entityMetadata.getKind());
      for (int i = 0; i < identifiers.size(); i++) {
        long id = identifiers.get(i);
        nativeKeys[i] = keyFactory.newKey(id);
      }
      return nativeKeys;
    }
docs: Converts the given list of identifiers into an array of native Key objects.
  
  @param entityClass
  the entity class to which these identifiers belong to.
  @param identifiers
  the list of identifiers to convert.
  @return an array of Key objects