code: @SuppressWarnings("unchecked")
      private Class<PageEnum> getPageEnumClass() {
          Class<PageEnum> res = null;
          if (object() != null && object().pageEnumClass() != null) {
              res = (Class<PageEnum>) object().pageEnumClass();
          } else if (getFirstKeyPart() instanceof Class && PageEnum.class.isAssignableFrom((Class<?>) getFirstKeyPart())) {
              res = (Class<PageEnum>) getFirstKeyPart();
          }
          return res;
      }
docs: Returns the page enum class associated to this model.
  
  Checks the modelObject and return it only if it extends {@link PageEnum}
  
  @return the page enum class