Interface ContentQueryRowSet
-
- All Known Subinterfaces:
ContentViewerRowSetModel
public interface ContentQueryRowSet
A row set returned from a ContentQuery.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<ContentQueryRow>
getCurrentLevelRows()
Returns a list ofContentQueryRow
, one row per document on the current level.List<ContentQueryRow>
getRows()
Returns a list ofContentQueryRow
, one row per document.<T> List<T>
getRows(Class<T> clazz)
Returns a view of these ContentQueryRows as beans with the given type, one per document.<T> List<T>
getRows(Class<T> clazz, Object... autowireObjects)
Returns a view of these ContentQueryRows as beans with the given type, one per document.<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.Optional<Long>
getTotalRowCount()
Returns total number of rows available for the query.
-
-
-
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
List<ContentQueryRow> getRows()
Returns a list ofContentQueryRow
, one row per document.This will include rows retrieved during traversal.
-
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 intoautowireObjects
- 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 intobeanPostProcessor
- BiConsumer allowing additional processing using ContentQueryRow and the mapped bean.
-
getCurrentLevelRows
List<ContentQueryRow> getCurrentLevelRows()
Returns a list ofContentQueryRow
, one row per document on the current level.This method may return a new list for every invocation.
-
-