![JAR search and dependency download from the Maven repository](/logo.png)
co.easimart.EasimartQueryController Maven / Gradle / Ivy
package co.easimart;
import java.util.List;
import bolts.Task;
/**
* A {@code EasimartQueryController} defines how a {@link EasimartQuery} is executed.
*/
/** package */ interface EasimartQueryController {
/**
* Executor for {@code find} queries.
* @param state Immutable query state to execute.
* @param user The user executing the query that can be used to match ACLs.
* @param cancellationToken Cancellation token.
* @return A {@link Task} that resolves to the results of the find.
*/
public Task> findAsync(EasimartQuery.State state, EasimartUser user,
Task cancellationToken);
/**
* Executor for {@code count} queries.
* @param state Immutable query state to execute.
* @param user The user executing the query that can be used to match ACLs.
* @param cancellationToken Cancellation token.
* @return A {@link Task} that resolves to the results of the count.
*/
public Task countAsync(EasimartQuery.State state, EasimartUser user,
Task cancellationToken);
/**
* Executor for {@code getFirst} queries.
* @param state Immutable query state to execute.
* @param user The user executing the query that can be used to match ACLs.
* @param cancellationToken Cancellation token.
* @return A {@link Task} that resolves to the the first result of the query if successful and
* there is at least one result or {@link EasimartException#OBJECT_NOT_FOUND} if there are no
* results.
*/
public Task getFirstAsync(EasimartQuery.State state, EasimartUser user,
Task cancellationToken);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy