code: public static FetchMode getFetchMode(Object object) {
          String name = object != null ? object.toString() : "default";
          if (name.equalsIgnoreCase(FetchMode.JOIN.toString()) || name.equalsIgnoreCase("eager")) {
              return FetchMode.JOIN;
          }
          if (name.equalsIgnoreCase(FetchMode.SELECT.toString()) || name.equalsIgnoreCase("lazy")) {
              return FetchMode.SELECT;
          }
          return FetchMode.DEFAULT;
      }
docs: Retrieves the fetch mode for the specified instance; otherwise returns the default FetchMode.
  
  @param object The object, converted to a string
  @return The FetchMode