KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > modules > actions > portlets > browser > BrowserQuery


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.modules.actions.portlets.browser;
18
19 import java.util.List JavaDoc;
20
21 import org.apache.turbine.util.RunData;
22
23 import org.apache.velocity.context.Context;
24
25 /**
26  * Browser Query Fetch Interface
27  *
28  * @author <a HREF="mailto:taylor@apache.org">David Sean Taylor</a>
29  * @version $Id: BrowserQuery.java,v 1.9 2004/02/23 02:51:19 jford Exp $
30  *
31 */

32 public interface BrowserQuery
33 {
34
35     /**
36      * This method returns the query to be executed to get the results which will
37      * be opened in the browser.
38      *
39      */

40     public String JavaDoc getQueryString(RunData rundata, Context context);
41
42     /**
43      * Filter the row programmatically on a query.
44      * By returning true, instruct the database browser to filter the row.
45      * By returning false, instruct the database browser to keep the row.
46      * (Filtering means removing the row from the final result set).
47      *
48      * @param row The row being inspected for filtration.
49      * @return True to filter the row, false to keep it.
50      */

51     public boolean filter(List JavaDoc row, RunData rundata);
52
53     /*
54      * Set a list of JDBC query parameters.
55      * All members of this list must be java objects (not primitives)
56      * Should be called from derived classes.
57      *
58      */

59     public void setSQLParameters(List JavaDoc parameters);
60
61     public List JavaDoc getSQLParameters();
62
63
64 }
65
Popular Tags