Package org.apache.iceberg
Class SortOrder.Builder
- java.lang.Object
-
- org.apache.iceberg.SortOrder.Builder
-
- All Implemented Interfaces:
SortOrderBuilder<SortOrder.Builder>
- Enclosing class:
- SortOrder
public static class SortOrder.Builder extends java.lang.Object implements SortOrderBuilder<SortOrder.Builder>
A builder used to create validsort orders
.Call
SortOrder.builderFor(Schema)
to create a new builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortOrder.Builder
asc(Term term, NullOrder nullOrder)
Add an expression term to the sort, ascending with the given null order.SortOrder
build()
SortOrder.Builder
caseSensitive(boolean sortCaseSensitive)
SortOrder.Builder
desc(Term term, NullOrder nullOrder)
Add an expression term to the sort, ascending with the given null order.SortOrder.Builder
sortBy(java.lang.String name, SortDirection direction, NullOrder nullOrder)
SortOrder.Builder
sortBy(Term term, SortDirection direction, NullOrder nullOrder)
SortOrder.Builder
withOrderId(int newOrderId)
-
-
-
Method Detail
-
asc
public SortOrder.Builder asc(Term term, NullOrder nullOrder)
Add an expression term to the sort, ascending with the given null order.- Specified by:
asc
in interfaceSortOrderBuilder<SortOrder.Builder>
- Parameters:
term
- an expression termnullOrder
- a null order (first or last)- Returns:
- this for method chaining
-
desc
public SortOrder.Builder desc(Term term, NullOrder nullOrder)
Add an expression term to the sort, ascending with the given null order.- Specified by:
desc
in interfaceSortOrderBuilder<SortOrder.Builder>
- Parameters:
term
- an expression termnullOrder
- a null order (first or last)- Returns:
- this for method chaining
-
sortBy
public SortOrder.Builder sortBy(java.lang.String name, SortDirection direction, NullOrder nullOrder)
-
sortBy
public SortOrder.Builder sortBy(Term term, SortDirection direction, NullOrder nullOrder)
-
withOrderId
public SortOrder.Builder withOrderId(int newOrderId)
-
caseSensitive
public SortOrder.Builder caseSensitive(boolean sortCaseSensitive)
-
build
public SortOrder build()
-
-