code: private Object checkAndProxyReturnValue(Object retValue) {
          if (retValue != null && retValue instanceof RESTBaseEntityCollectionV1) {
              // The parent will either be a user defined parent, or the entity itself.
              final RESTBaseEntityV1<?> parent = this.parent == null ? getProxyEntity() : this.parent;
              return RESTCollectionProxyFactory.create(getProviderFactory(), (RESTBaseEntityCollectionV1) retValue, isRevision, parent);
          } else {
              return retValue;
          }
      }
docs: Checks the return value and creates a proxy for the content if required.
  
  @param retValue The value to be returned.
  @return The return value with proxied content.