public final class SearchHelper extends Object
Searcher
instances returned by the methods can be further used to build queries.Searcher
, FilterBuilder
, OrderBuilder
, OrderBuilder.OrderChainBuilder
Modifier and Type | Method and Description |
---|---|
static Searcher |
newFieldSearcher(String select)
Returns a searcher instance with only the selection fields set.
|
static Searcher |
newFieldSearcher(String select, Filter where)
Returns a searcher instance with only the selection fields and a filter set.
|
static Searcher |
newFieldSearcher(String select, Filter where, Orders orderBy)
Returns a searcher instance with only the selection fields, a filter and sort orders set.
|
static Searcher |
newFieldSearcher(String select, Orders orderBy)
Returns a searcher instance with only the selection fields and sort orders set.
|
static Searcher |
newFieldSearcherForType(String select, String from)
Returns a searcher instance with only the selection fields and the asset type set.
|
static Searcher |
newFieldSearcherForType(String select, String from, Filter where)
Returns a searcher instance with only the selection fields, the asset type and a filter set.
|
static Searcher |
newFieldSearcherForType(String select, String from, Filter where, Orders orderBy)
Returns a searcher instance with only the selection fields, the asset type, a filter and sort orders set.
|
static Searcher |
newFieldSearcherForType(String select, String from, Orders orderBy)
Returns a searcher instance with only the selection fields, the asset type and sort orders set.
|
static Searcher |
newFieldSearcherForTypeInSite(String select, String from, String in)
Returns a searcher instance with only the selection fields, the asset type and the site name set.
|
static Searcher |
newFieldSearcherForTypeInSite(String select, String from, String in, Filter where)
Returns a searcher instance with only the selection fields, the asset type, the site name and a filter set.
|
static Searcher |
newFieldSearcherForTypeInSite(String select, String from, String in, Filter where, Orders orderBy)
Returns a searcher instance with the selection fields, the asset type, the site name, a filter and sort orders set.
|
static Searcher |
newFieldSearcherForTypeInSite(String select, String from, String in, Orders orderBy)
Returns a searcher instance with only the selection fields, the asset type, the site name and sort orders set.
|
static Searcher |
newFieldSearcherInSite(String select, String in)
Returns a searcher instance with only the selection fields and the site name set.
|
static Searcher |
newFieldSearcherInSite(String select, String in, Filter where)
Returns a searcher instance with only the selection fields, the site name and a filter set.
|
static Searcher |
newFieldSearcherInSite(String select, String in, Filter where, Orders orderBy)
Returns a searcher instance with only the selection fields, the site name, a filter and sort orders set.
|
static Searcher |
newFieldSearcherInSite(String select, String in, Orders orderBy)
Returns a searcher instance with only the selection fields, the site name and sort orders set.
|
static Filter |
newFilter(String left, BinaryRelationalOperator operator, String right, String... more)
Returns a simple
Filter based on an expression. |
static Order |
newOrder(SortDirection direction, String sortField)
Returns an
Order instance for the specified field with the specified sort direction. |
static Order |
newOrder(String sortField)
Returns an
Order instance for the specified field with the default sort direction. |
static OrderBuilder.OrderChainBuilder<?> |
newOrderChain(SortDirection direction, String sortField, String... more)
Returns a sort order building chain with the specified fields in sequence, with the specified sort direction.
|
static OrderBuilder.OrderChainBuilder<?> |
newOrderChain(String sortField, String... more)
Returns a sort order building chain with the specified fields in sequence, with the default sort direction.
|
static Orders |
newOrders(Order orderBy, Order... thenBy)
Returns a sort order which includes the specified
Order instances, keeping the sequence same. |
static Orders |
newOrders(SortDirection direction, String sortField, String... more)
Returns a sort order which includes the specified fields in sequence, with the specified sort direction.
|
static Orders |
newOrders(String sortField, String... more)
Returns a sort order which includes the specified fields in sequence, with the default sort direction.
|
static Searcher |
newSearcher()
Returns a searcher instance without any clauses set.
|
static Searcher |
newSearcher(Filter where)
Returns a searcher instance with only a filter set.
|
static Searcher |
newSearcher(Filter where, Orders orderBy)
Returns a searcher instance with only a filter and sort orders set.
|
static Searcher |
newSearcher(Orders orderBy)
Returns a searcher instance with only sort orders set.
|
static Searcher |
newSearcherForType(String from, Filter where)
Returns a searcher instance with only the asset type and a filter set.
|
static Searcher |
newSearcherForType(String from, Filter where, Orders orderBy)
Returns a searcher instance with only the asset type, a filter and sort orders set.
|
static Searcher |
newSearcherForType(String from, Orders orderBy)
Returns a searcher instance with only the asset type and sort orders set.
|
static Searcher |
newSearcherForType(String assetType, String... subtypes)
Returns a searcher instance with only the asset type set.
|
static Searcher |
newSearcherForTypeInSite(String from, String in)
Returns a searcher instance with only the asset type and the site name set.
|
static Searcher |
newSearcherForTypeInSite(String from, String in, Filter where)
Returns a searcher instance with only the asset type, the site name and a filter set.
|
static Searcher |
newSearcherForTypeInSite(String from, String in, Filter where, Orders orderBy)
Returns a searcher instance with only the asset type, the site name, a filter and sort orders set.
|
static Searcher |
newSearcherForTypeInSite(String from, String in, Orders orderBy)
Returns a searcher instance with only the asset type, the site name and sort orders set.
|
static Searcher |
newSearcherInSite(String in)
Returns a searcher instance with only the site name set.
|
static Searcher |
newSearcherInSite(String in, Filter where)
Returns a searcher instance with only the site name and a filter set.
|
static Searcher |
newSearcherInSite(String in, Filter where, Orders orderBy)
Returns a searcher instance with only he site name, a filter and sort orders set.
|
static Searcher |
newSearcherInSite(String in, Orders orderBy)
Returns a searcher instance with only the site name and sort orders set.
|
public static Searcher newSearcher()
Searcher.selectAll()
.Searcher
instance.Searcher.selectAll()
public static Searcher newSearcher(Orders orderBy)
Searcher.selectAll()
.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.orderBy(Orders)
public static Searcher newSearcher(Filter where)
Searcher.selectAll()
.where
- the filtering condition(s) for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.filter(Filter)
public static Searcher newSearcher(Filter where, Orders orderBy)
Searcher.selectAll()
.where
- the filtering condition(s) for the search using this query.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Searcher newSearcherInSite(String in)
Searcher.selectAll()
.in
- the name of the site in which the search should be performed.Searcher
instance.Searcher.selectAll()
, Searcher.inSite(String)
public static Searcher newSearcherInSite(String in, Orders orderBy)
Searcher.selectAll()
.in
- the name of the site in which the search should be performed.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.inSite(String)
, Searcher.orderBy(Orders)
public static Searcher newSearcherInSite(String in, Filter where)
Searcher.selectAll()
.in
- the name of the site in which the search should be performed.where
- the filtering condition(s) for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.inSite(String)
, Searcher.filter(Filter)
public static Searcher newSearcherInSite(String in, Filter where, Orders orderBy)
Searcher.selectAll()
.in
- the name of the site in which the search should be performed.where
- the filtering condition(s) for the search using this query.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.inSite(String)
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Searcher newSearcherForType(String assetType, String... subtypes)
Searcher.selectAll()
.assetType
- the asset type for which the search should be performed.subtypes
- the subtypes for which the search should be performed.Searcher
instance.public static Searcher newSearcherForType(String from, Orders orderBy)
Searcher.selectAll()
.from
- the asset type for which the search should be performed.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.from(String, String...)
, Searcher.orderBy(Orders)
public static Searcher newSearcherForType(String from, Filter where)
Searcher.selectAll()
.from
- the asset type for which the search should be performed.where
- the filtering condition(s) for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.from(String, String...)
, Searcher.filter(Filter)
public static Searcher newSearcherForType(String from, Filter where, Orders orderBy)
Searcher.selectAll()
.from
- the asset type for which the search should be performed.where
- the filtering condition(s) for the search using this query.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.from(String, String...)
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Searcher newSearcherForTypeInSite(String from, String in)
Searcher.selectAll()
.from
- the asset type for which the search should be performed.in
- the name of the site in which the search should be performed.Searcher
instance.Searcher.selectAll()
, Searcher.from(String, String...)
, Searcher.inSite(String)
public static Searcher newSearcherForTypeInSite(String from, String in, Orders orderBy)
Searcher.selectAll()
.from
- the asset type for which the search should be performed.in
- the name of the site in which the search should be performed.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.from(String, String...)
, Searcher.inSite(String)
, Searcher.orderBy(Orders)
public static Searcher newSearcherForTypeInSite(String from, String in, Filter where)
Searcher.selectAll()
.from
- the asset type for which the search should be performed.in
- the name of the site in which the search should be performed.where
- the filtering condition(s) for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.from(String, String...)
, Searcher.inSite(String)
, Searcher.filter(Filter)
public static Searcher newSearcherForTypeInSite(String from, String in, Filter where, Orders orderBy)
Searcher.selectAll()
.from
- the asset type for which the search should be performed.in
- the name of the site in which the search should be performed.where
- the filtering condition(s) for the search using this query.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.selectAll()
, Searcher.from(String, String...)
, Searcher.inSite(String)
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcher(String select)
select
- the selection fields which should be returned by the search.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
, Searcher.inSite(String)
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcher(String select, Orders orderBy)
select
- the selection fields which should be returned by the search.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcher(String select, Filter where)
select
- the selection fields which should be returned by the search.where
- the filtering condition(s) for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.filter(Filter)
public static Searcher newFieldSearcher(String select, Filter where, Orders orderBy)
select
- the selection fields which should be returned by the search.where
- the filtering condition(s) for the search using this query.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcherInSite(String select, String in)
select
- the selection fields which should be returned by the search.in
- the name of the site in which the search should be performed.Searcher
instance.Searcher.select(String, String...)
, Searcher.inSite(String)
public static Searcher newFieldSearcherInSite(String select, String in, Orders orderBy)
select
- the selection fields which should be returned by the search.in
- the name of the site in which the search should be performed.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.inSite(String)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcherInSite(String select, String in, Filter where)
select
- the selection fields which should be returned by the search.in
- the name of the site in which the search should be performed.where
- the filtering condition(s) for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.inSite(String)
, Searcher.filter(Filter)
public static Searcher newFieldSearcherInSite(String select, String in, Filter where, Orders orderBy)
select
- the selection fields which should be returned by the search.in
- the name of the site in which the search should be performed.where
- the filtering condition(s) for the search using this query.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.inSite(String)
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcherForType(String select, String from)
select
- the selection fields which should be returned by the search.from
- the asset type for which the search should be performed.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
public static Searcher newFieldSearcherForType(String select, String from, Orders orderBy)
select
- the selection fields which should be returned by the search.from
- the asset type for which the search should be performed.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcherForType(String select, String from, Filter where)
select
- the selection fields which should be returned by the search.from
- the asset type for which the search should be performed.where
- the filtering condition(s) for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
, Searcher.filter(Filter)
public static Searcher newFieldSearcherForType(String select, String from, Filter where, Orders orderBy)
select
- the selection fields which should be returned by the search.from
- the asset type for which the search should be performed.where
- the filtering condition(s) for the search using this query.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcherForTypeInSite(String select, String from, String in)
select
- the selection fields which should be returned by the search.from
- the asset type for which the search should be performed.in
- the name of the site in which the search should be performed.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
, Searcher.inSite(String)
public static Searcher newFieldSearcherForTypeInSite(String select, String from, String in, Orders orderBy)
select
- the selection fields which should be returned by the search.from
- the asset type for which the search should be performed.in
- the name of the site in which the search should be performed.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
, Searcher.inSite(String)
, Searcher.orderBy(Orders)
public static Searcher newFieldSearcherForTypeInSite(String select, String from, String in, Filter where)
select
- the selection fields which should be returned by the search.from
- the asset type for which the search should be performed.in
- the name of the site in which the search should be performed.where
- the filtering condition(s) for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
, Searcher.inSite(String)
, Searcher.filter(Filter)
public static Searcher newFieldSearcherForTypeInSite(String select, String from, String in, Filter where, Orders orderBy)
select
- the selection fields which should be returned by the search.from
- the asset type for which the search should be performed.in
- the name of the site in which the search should be performed.where
- the filtering condition(s) for the search using this query.orderBy
- the sort order for the search using this query.Searcher
instance.Searcher.select(String, String...)
, Searcher.from(String, String...)
, Searcher.inSite(String)
, Searcher.filter(Filter)
, Searcher.orderBy(Orders)
public static Filter newFilter(String left, BinaryRelationalOperator operator, String right, String... more)
Filter
based on an expression. The expression has left
as the left operand, and right
or the varargs (more
) as the right operand values.left
- the left operand for the expressionoperator
- the operator for the expressionright
- the right operand for the expressionmore
- more values for the right operand for the expressionFilter
public static Order newOrder(String sortField)
Order
instance for the specified field with the default sort direction.sortField
- the field to sort by.Order
instance.Order
, SortDirection
public static Order newOrder(SortDirection direction, String sortField)
Order
instance for the specified field with the specified sort direction.direction
- the direction in which to sort.sortField
- the field to sort by.Order
instance.Order
, SortDirection
public static Orders newOrders(Order orderBy, Order... thenBy)
Order
instances, keeping the sequence same.orderBy
- the first sort order.thenBy
- more sort orders.Orders
instanceOrder
, Orders
, SortDirection
public static Orders newOrders(String sortField, String... more)
sortField
- the first sort order field.more
- more sort order fields.Orders
instance.Orders
, SortDirection
public static Orders newOrders(SortDirection direction, String sortField, String... more)
direction
- the direction in which to sort.sortField
- the first sort order field.more
- more sort order fields.Orders
instance.Orders
, SortDirection
public static OrderBuilder.OrderChainBuilder<?> newOrderChain(String sortField, String... more)
sortField
- the first sort order field.more
- more sort order fields.OrderBuilder.OrderChainBuilder
instance.OrderBuilder
, OrderBuilder.OrderChainBuilder
, SortDirection
public static OrderBuilder.OrderChainBuilder<?> newOrderChain(SortDirection direction, String sortField, String... more)
direction
- the direction in which to sort.sortField
- the first sort order field.more
- more sort order fields.OrderBuilder.OrderChainBuilder
instance.OrderBuilder
, OrderBuilder.OrderChainBuilder
, SortDirection