code: public static String jpaFetch(PackageImportAdder adder, FetchTypeGetter... fetchTypeGetters) {
          Assert.notNull(adder);
  
          if (fetchTypeGetters == null) {
              return "";
          }
  
          // we look for the first non empty conf.
          // not that it could be a NONE conf => user does not want any fetch type.
  
          for (FetchTypeGetter fetchTypeGetter : fetchTypeGetters) {
              if (fetchTypeGetter != null) {
                  if (fetchTypeGetter.getFetch() != null) {
                      if (fetchTypeGetter.getFetch().isJpaType()) {
                          FetchType fetchType = fetchTypeGetter.getFetch().asJpaType();
                          adder.addImport("static javax.persistence.FetchType." + fetchType.name());
                          return "fetch = " + fetchType.name();
                      } else { // NONE
                          return ""; // user explicitly said he does not want any fetch type.
                      }
                  }
              }
          }
  
          return "";
      }
docs: ------------------------------------------