E- the type of value yielded by this execution context, as determined by which
Selectfactory method was used to begin the query. For example,
public static interface SelectQuery.ExecutionContext<E>
Selectqueries that is available after calling
The methods available through the execution context specify how the selected entities should be returned
to the caller. For example,
asList() will return a list of values, or
count() will return
only a count of them.
|Modifier and Type||Method and Description|
Returns the selected values in a list.
Returns the selected values in a list with the mapping function applied to each of them.
Returns the selected values in a map with the mapping functions applies to each of them.
Returns a count of matching items.
Performs the given action for each entity returned by the query.
Returns the single Entity that is the result of this query.
Visits each entity returned by the query.
Function<GenericValue,String>, then each value is returned as the
Stringproduced by the function instead of the
R- the type of value returned by the mapping function
Function<GenericValue,String>, then the returned map is of type
Map<Long,String>. If the same key is returned by the
keyMappermore than once, the last value wins. The functions are permitted to return
K- the inferred key type for the returned map
V- the inferred value type for the returned map
keyMapper- the function that maps the queries values to the returned map's keys
valueMapper- the function that maps the queries values to the returned map's values
null if no rows were returned by the DB query.
nullif no match is found.
IllegalStateException- if more than one row is found.
<R> R consumeWith(@Nonnull EntityListConsumer<E,R> consumer)
EntityListConsumerto the returned results.
This is equivalent to calling
visitWith(Visitor), except that the entity list consumer can
return a value.
R- the return value of the consumer
consumer- the entity list consumer that will consume the query results
visitor- the visitor to call with each entity that the query returns
void forEach(@Nonnull java.util.function.Consumer<E> action)
visitWith(Visitor), but is more consistent with the naming conventions of the Java 8 streaming interfaces.
action- the action to be performed
entityName + "Count"pseudo-view stuff in the entity model, but rather generates a count function directly in the query that it executes, so you should be able to use it with arbitrary entities.
Copyright © 2002-2017 Atlassian. All Rights Reserved.