code: static void validateDeferredIdAllocation(Object entity) {
      IdentifierMetadata identifierMetadata = EntityIntrospector.getIdentifierMetadata(entity);
      if (identifierMetadata.getDataType() == DataType.STRING) {
        throw new EntityManagerException(
            "Deferred ID allocation is not applicable for entities with String identifiers. ");
      }
  
    }
docs: Validates if the given entity is valid for deferred ID allocation. Deferred ID allocation is
  valid for entities using a numeric ID.
  
  @param entity
  the entity to validate
  @throws EntityManagerException
  if the given entity does not use a numeric ID