#919 - io.ebean package initial

This commit is contained in:
Rob Bygrave
2016-12-11 23:23:22 +13:00
parent 5821dc96b9
commit 971e2dc91b
2134 changed files with 10721 additions and 8652 deletions
@@ -0,0 +1,39 @@
package io.ebeaninternal.server.query;
import io.ebean.FutureRowCount;
import io.ebean.Query;
import io.ebean.Transaction;
import java.util.concurrent.FutureTask;
/**
* Future implementation for the row count query.
*/
public class QueryFutureRowCount<T> extends BaseFuture<Integer> implements FutureRowCount<T> {
private final CallableQueryRowCount<T> call;
public QueryFutureRowCount(CallableQueryRowCount<T> call) {
super(new FutureTask<>(call));
this.call = call;
}
public FutureTask<Integer> getFutureTask() {
return futureTask;
}
public Transaction getTransaction() {
return call.transaction;
}
public Query<T> getQuery() {
return call.query;
}
public boolean cancel(boolean mayInterruptIfRunning) {
call.query.cancel();
return super.cancel(mayInterruptIfRunning);
}
}