public static final class SearchArgs.Builder extends Object
SearchArgs class.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
SearchArgs |
build()
Construct the
SearchArgs object. |
SearchArgs.Builder |
ignoreCase(boolean value)
Specifies whether case-insensitive search should be used.
|
SearchArgs.Builder |
limit(int limit)
Specifies the number of rows to return.
|
SearchArgs.Builder |
position(int position)
Specifies the starting line number.
|
SearchArgs.Builder |
search(String searchTerms)
Adds search terms to this builder.
|
SearchArgs.Builder |
search(String column,
String searchTerm)
Adds a search term to this builder.
|
SearchArgs.Builder |
sort(Collection<String> sortArgs)
Specifies the sort arguments.
|
SearchArgs.Builder |
sort(String sortArgs)
Specifies the sort arguments.
|
SearchArgs.Builder |
view(Collection<String> columns)
Specifies the list of columns to view.
|
SearchArgs.Builder |
view(String columns)
Specifies the list of columns to view.
|
public Builder()
public SearchArgs.Builder search(String searchTerms)
The search terms are a comma-delimited list of key/value pairs of column-names and search tokens.
For example:
builder.search(
It's up to implementers to decide the syntax and meaning of the search terms.
Whitespace is trimmed from column names and search tokens.
searchTerms - The search terms string.
Can be public SearchArgs.Builder search(String column, String searchTerm)
It's up to implementers to decide the syntax and meaning of the search term.
column - The column being searched.searchTerm - The search term.public SearchArgs.Builder view(String columns)
The columns argument is a simple comma-delimited list of column names.
For example:
builder.view(
Whitespace is trimmed from column names.
Empty view columns imply view all columns.
columns - The columns being viewed.
Can be public SearchArgs.Builder view(Collection<String> columns)
Empty view columns imply view all columns.
columns - The columns being viewed.public SearchArgs.Builder sort(String sortArgs)
The sort argument is a simple comma-delimited list of column names.
Column names can be suffixed with
No suffix implies ascending order.
For example:
Note that the order of the order arguments is important.
Whitespace is trimmed from column names.
sortArgs - The columns to sort by.
Can be public SearchArgs.Builder sort(Collection<String> sortArgs)
Column names can be suffixed with
No suffix implies ascending order.
Note that the order of the sort is important.
sortArgs - The columns to sort by.
Can be public SearchArgs.Builder position(int position)
position - The zero-indexed position.public SearchArgs.Builder limit(int limit)
limit - The number of rows to return.
If public SearchArgs.Builder ignoreCase(boolean value)
The default is
value - The ignore-case flag value.public SearchArgs build()
SearchArgs object.
This method can be called multiple times to construct new objects.
SearchArgs object initialized with values in this builder.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.