View Javadoc

1   /*
2    * $Id: QueryResults.java,v 1.1.1.1 2005/02/17 18:37:35 mch Exp $
3    *
4    * (C) Copyright Astrogrid...
5    */
6   
7   package org.astrogrid.dataservice.queriers;
8   
9   import java.io.IOException;
10  import java.security.Principal;
11  import org.astrogrid.query.returns.ReturnSpec;
12  
13  /*** A container interface that holds the results of a query until needed.
14   * <p>
15   *   Basically we
16   * don't know what format the raw results will be in (eg, they may be SqlResults for
17   * an JDBC connection, but something else altogether for other catalogue formats)
18   * so this is a 'container' to hold those results until it needs to be
19   * translated. It would be fully
20   * implemented by the same package that implements the DatabaseQuerier and
21   * QueryTranslater.
22   *
23   * @author M Hill
24   */
25  
26  public interface QueryResults
27  {
28  
29     /*** This is a helper method for plugins; it is meant to be called
30      * from the askQuery method.  It transforms the results and sends them
31      * as required, updating the querier status appropriately.
32      */
33     public void send(ReturnSpec returns, Principal user) throws IOException;
34  
35  
36  }
37  
38  
39