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

io.ebeaninternal.server.query.CallableQueryList Maven / Gradle / Ivy

There is a newer version: 15.8.1
Show newest version
package io.ebeaninternal.server.query;

import io.ebean.Transaction;
import io.ebeaninternal.api.SpiEbeanServer;
import io.ebeaninternal.api.SpiQuery;

import java.util.List;
import java.util.concurrent.Callable;

/**
 * Represent the findList query as a Callable.
 *
 * @param  the entity bean type
 */
public class CallableQueryList extends CallableQuery implements Callable> {


  public CallableQueryList(SpiEbeanServer server, SpiQuery query, Transaction t) {
    super(server, query, t);
  }

  /**
   * Execute the query returning the resulting List.
   */
  @Override
  public List call() throws Exception {
    try {
      return server.findList(query, transaction);
    } finally {
      // cleanup the underlying connection
      transaction.end();
    }
  }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy