Interface ContentQueryRowSet

  • All Known Subinterfaces:
    ContentViewerRowSetModel

    public interface ContentQueryRowSet
    A row set returned from a ContentQuery.
    • Method Detail

      • getTotalRowCount

        Optional<Long> getTotalRowCount()
        Returns total number of rows available for the query.

        The "total number of rows available" reflects what can be requested, above and beyond the specified start() and limit() criteria. The value is only available if specially requested on the ContentQuery using includingRowCount().

        Traversal is not supported and this method will only apply to the main query and the top level rows.

        Returns:
        total number of rows available for the main query.
      • getRows

        <T> List<T> getRows​(Class<T> clazz)
        Returns a view of these ContentQueryRows as beans with the given type, one per document.

        This will include rows retrieved during traversal.

        Parameters:
        clazz - Java class to map into and return
      • getRows

        <T> List<T> getRows​(Class<T> clazz,
                            Object... autowireObjects)
        Returns a view of these ContentQueryRows as beans with the given type, one per document.

        Supports @Autowired fields using the specified autowireObjects and a @PostConstruct annotated method will be called afterwards if present.

        Parameters:
        clazz - Java class to map into
        autowireObjects - add any additional objects you wish to autowire. ContentQueryRow is always available for autowiring.
      • getRows

        <T> List<T> getRows​(Class<T> clazz,
                            BiConsumer<ContentQueryRow,​T> beanPostProcessor)
        Returns a view of these ContentQueryRows as beans with the given type, one per document.
        Parameters:
        clazz - Java class to map into
        beanPostProcessor - BiConsumer allowing additional processing using ContentQueryRow and the mapped bean.
      • getCurrentLevelRows

        List<ContentQueryRow> getCurrentLevelRows()
        Returns a list of ContentQueryRow, one row per document on the current level.

        This method may return a new list for every invocation.