1 /*
2 * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/event/AbstractDatabaseEventFactory.java,v 1.1 2005/11/30 20:31:17 hkollmann Exp $
3 * $Revision: 1.1 $
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.dbforms.config.DbFormsConfig;
27
28 import javax.servlet.http.HttpServletRequest;
29
30
31
32 /***
33 * DatabaseEventFactory class. Create DatabaseEvent objects.
34 *
35 * @author Luca Fossato
36 *
37 */
38 public abstract class AbstractDatabaseEventFactory extends AbstractEventFactory {
39 /***
40 * Create and return a new InsertEvent as secondary event.
41 *
42 * @param tableId the table identifier
43 * @param keyId DOCUMENT ME!
44 * @param request the HttpServletRequest object
45 * @param config the DbForms config object
46 *
47 * @return The updateEvent object
48 */
49 public abstract AbstractDatabaseEvent createInsertEvent(int tableId,
50 String keyId,
51 HttpServletRequest request,
52 DbFormsConfig config);
53
54
55 /***
56 * Create and return a new UpdateEvent as secondary event.
57 *
58 * @param tableId the table identifier
59 * @param keyId the key identifier
60 * @param request the HttpServletRequest object
61 * @param config the DbForms config object
62 *
63 * @return The updateEvent object
64 */
65 public abstract AbstractDatabaseEvent createUpdateEvent(int tableId,
66 String keyId,
67 HttpServletRequest request,
68 DbFormsConfig config);
69 }