View Javadoc

1   /*
2    * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/event/NavCopyEvent.java,v 1.14 2005/11/30 20:31:17 hkollmann Exp $
3    * $Revision: 1.14 $
4    * $Date: 2005/11/30 20:31:17 $
5    *
6    * DbForms - a Rapid Application Development Framework
7    * Copyright (C) 2001 Joachim Peer <joepeer@excite.com>
8    *
9    * This library is free software; you can redistribute it and/or
10   * modify it under the terms of the GNU Lesser General Public
11   * License as published by the Free Software Foundation; either
12   * version 2.1 of the License, or (at your option) any later version.
13   *
14   * This library is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17   * Lesser General Public License for more details.
18   *
19   * You should have received a copy of the GNU Lesser General Public
20   * License along with this library; if not, write to the Free Software
21   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
22   */
23  
24  package org.dbforms.event;
25  
26  import org.apache.commons.logging.Log;
27  import org.apache.commons.logging.LogFactory;
28  import org.dbforms.config.DbFormsConfig;
29  import org.dbforms.config.FieldValue;
30  import org.dbforms.config.ResultSetVector;
31  import org.dbforms.config.Table;
32  import org.dbforms.interfaces.DbEventInterceptorData;
33  
34  import java.sql.SQLException;
35  
36  import javax.servlet.http.HttpServletRequest;
37  
38  
39  
40  /***
41   * <p>
42   * This event signalizes to the framework that the user wants to initialize a
43   * new dataset  with values coming from current row
44   * </p>
45   * #fixme: lousy description
46   *
47   * @author Stefano Borghi
48   * @version $Revision: 1.14 $
49   */
50  public class NavCopyEvent extends AbstractNavigationEvent {
51  	   private static Log logCat = LogFactory.getLog(NavCopyEvent.class.getName()); // logging category for this class
52     /***
53      * Creates a new NavCopyEvent object.
54      *
55      * @param action DOCUMENT ME!
56      * @param request DOCUMENT ME!
57      * @param config DOCUMENT ME!
58      */
59     public NavCopyEvent(String             action,
60                         HttpServletRequest request,
61                         DbFormsConfig      config) {
62        super(action, request, config);
63     }
64  
65  
66     /***
67      * Creates a new NavCopyEvent object.
68      *
69      * @param table DOCUMENT ME!
70      * @param request DOCUMENT ME!
71      * @param config DOCUMENT ME!
72      */
73     public NavCopyEvent(Table              table,
74                         HttpServletRequest request,
75                         DbFormsConfig      config) {
76        super(table, request, config);
77     }
78  
79     /***
80      * Process the current event.
81      *
82      * @param childFieldValues FieldValue array used to restrict a set of data
83      * @param orderConstraint FieldValue array used to build a cumulation of
84      *        rules for ordering (sorting) and restricting fields to the actual
85      *        block of data
86      * @param sqlFilter DOCUMENT ME!
87      * @param sqlFilterParams DOCUMENT ME!
88      * @param count record count
89      * @param firstPosition a string identifying the first resultset position
90      * @param lastPosition a string identifying the last resultset position
91      * @param dbConnectionName name of the used db connection. Can be used to
92      *        get an own db connection, e.g. to hold it during the session (see
93      *        DataSourceJDBC for example!)
94      * @param con the JDBC Connection object
95      *
96      * @return a ResultSetVector object
97      *
98      * @exception SQLException if any error occurs
99      */
100    public ResultSetVector processEvent(FieldValue[] childFieldValues,
101                                        FieldValue[] orderConstraint,
102                                        String       sqlFilter,
103                                        FieldValue[] sqlFilterParams,
104                                        int          count,
105                                        String       firstPosition,
106                                        String       lastPosition,
107                                        DbEventInterceptorData interceptorData)
108                                 throws SQLException {
109       logCat.info("processed NavCopyEvent");
110 
111       return null;
112    }
113 }