public <T> ListenableFuture<Result<T>> queryAsync(final Class<T> entityClass,
      final Statement statement) {
    Mapper<T> mapper = mapper(entityClass);
    Session session = mapper.getManager().getSession();
    ResultSetFuture rs = session.executeAsync(statement);
    return Futures.transformAsync(rs, rs1 -> Futures.immediateFuture(mapper.map(rs1)));
  }
public <T> ListenableFuture<Result<T>> queryAsync(final Class<T> entityClass,
      final Statement statement) {
    Mapper<T> mapper = mapper(entityClass);
    Session session = mapper.getManager().getSession();
    ResultSetFuture rs = session.executeAsync(statement);
    return Futures.transformAsync(rs, rs1 -> Futures.immediateFuture(mapper.map(rs1)));
  }
public < T > ListenableFuture < Result < T > > queryAsync ( final Class < T > entityClass , final Statement statement ) { Mapper < T > mapper = mapper ( entityClass ) ; Session session = mapper . getManager ( ) . getSession ( ) ; ResultSetFuture rs = session . executeAsync ( statement ) ; return Futures . transformAsync ( rs , rs1 -> Futures . immediateFuture ( mapper . map ( rs1 ) ) ) ; }
Execute a query and map result to entityClass.

@param entityClass Entity class.
@param statement Statement to execute.
@return A listenable future holding the result.
Execute a query and map result to entityClass .