All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.avaje.ebeaninternal.server.query.QueryFutureRowCount Maven / Gradle / Ivy

There is a newer version: 8.1.1
Show newest version
package com.avaje.ebeaninternal.server.query;

import java.util.concurrent.FutureTask;

import com.avaje.ebean.FutureRowCount;
import com.avaje.ebean.Query;
import com.avaje.ebean.Transaction;

/**
 * Future implementation for the row count query.
 */
public class QueryFutureRowCount extends BaseFuture implements FutureRowCount {

  private final CallableQueryRowCount call;

  public QueryFutureRowCount(CallableQueryRowCount call) {
    super(new FutureTask(call));
    this.call = call;
  }

  public FutureTask getFutureTask() {
    return futureTask;
  }

  public Transaction getTransaction() {
    return call.transaction;
  }

  public Query getQuery() {
    return call.query;
  }

  public boolean cancel(boolean mayInterruptIfRunning) {
    call.query.cancel();
    return super.cancel(mayInterruptIfRunning);
  }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy