Package org.apache.jackrabbit.oak.query
Class ResultImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.query.ResultImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.api.Result
Result.SizePrecision
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getColumnNames()Get the list of column names.String[]getColumnSelectorNames()Get the distinct selector names of all columns.Iterable<? extends ResultRow>getRows()Get the rows.String[]getSelectorNames()Get the list of selector names.longgetSize()Get the number of rows, if known.longgetSize(Result.SizePrecision precision, long max)Get the number of rows, if known.
-
-
-
Field Detail
-
query
protected final Query query
-
-
Method Detail
-
getColumnNames
public String[] getColumnNames()
Description copied from interface:ResultGet the list of column names.- Specified by:
getColumnNamesin interfaceResult- Returns:
- the column names
-
getColumnSelectorNames
public String[] getColumnSelectorNames()
Description copied from interface:ResultGet the distinct selector names of all columns. The list is ordered as selectors appear in the result. For columns without selector, an empty entry (null) is used.- Specified by:
getColumnSelectorNamesin interfaceResult- Returns:
- the distinct selector names
-
getSelectorNames
public String[] getSelectorNames()
Description copied from interface:ResultGet the list of selector names.- Specified by:
getSelectorNamesin interfaceResult- Returns:
- the selector names
-
getRows
public Iterable<? extends ResultRow> getRows()
Description copied from interface:ResultGet the rows.
-
getSize
public long getSize()
Description copied from interface:ResultGet the number of rows, if known. If the size is not known, -1 is returned.
-
getSize
public long getSize(Result.SizePrecision precision, long max)
Description copied from interface:ResultGet the number of rows, if known. If the size is not known, -1 is returned.- Specified by:
getSizein interfaceResult- Parameters:
precision- the required precisionmax- the maximum number that should be returned (Long.MAX_VALUE for unlimited). For EXACT, the cost of the operation is at most O(max). For approximations, the cost of the operation should be at most O(log max).- Returns:
- the (approximate) size. If an implementation does know the exact value, it returns it (even if the value is higher than max). If the implementation does not know the value, and the child node count is higher than max, it returns Long.MAX_VALUE.
-
-