org.dbforms.event
Class DatabaseEventFactoryImpl

java.lang.Object
  extended by org.dbforms.event.AbstractEventFactory
      extended by org.dbforms.event.AbstractDatabaseEventFactory
          extended by org.dbforms.event.DatabaseEventFactoryImpl

public class DatabaseEventFactoryImpl
extends AbstractDatabaseEventFactory

DatabaseEventFactoryImpl class. Create DatabaseEvent objects.

Author:
Luca Fossato

Field Summary
 
Fields inherited from class org.dbforms.event.AbstractEventFactory
eventInfoMap
 
Constructor Summary
DatabaseEventFactoryImpl()
           
 
Method Summary
 AbstractWebEvent createEvent(String action, HttpServletRequest request, DbFormsConfig config)
          create and return a new database event
 AbstractDatabaseEvent createInsertEvent(int tableId, String keyId, HttpServletRequest request, DbFormsConfig config)
          Create and return a new InsertEvent as secondary event.
 AbstractDatabaseEvent createUpdateEvent(int tableId, String keyId, HttpServletRequest request, DbFormsConfig config)
          Create and return a new UpdateEvent as secondary event.
protected  void initializeEvents()
          Initialize the default events.
static AbstractDatabaseEventFactory instance()
          Get the instance of DatabaseEventFactory class.
 
Methods inherited from class org.dbforms.event.AbstractEventFactory
addEventInfo, getEvent, getEventIdFromDestinationTable, getEventIdFromDestinationTable, getEventInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseEventFactoryImpl

public DatabaseEventFactoryImpl()
Method Detail

instance

public static AbstractDatabaseEventFactory instance()
Get the instance of DatabaseEventFactory class.

Returns:
the instance of DAO class.

createEvent

public AbstractWebEvent createEvent(String action,
                                    HttpServletRequest request,
                                    DbFormsConfig config)
create and return a new database event

Specified by:
createEvent in class AbstractEventFactory
Parameters:
action - the action string that identifies the web event
request - the HttpServletRequest object
config - the DbForms config object
Returns:
a new database event, or null if any error occurs

createInsertEvent

public AbstractDatabaseEvent createInsertEvent(int tableId,
                                               String keyId,
                                               HttpServletRequest request,
                                               DbFormsConfig config)
Create and return a new InsertEvent as secondary event.

Specified by:
createInsertEvent in class AbstractDatabaseEventFactory
Parameters:
tableId - the table identifier
keyId - the key identifier
request - the HttpServletRequest object
config - the DbForms config object
Returns:
The updateEvent object

createUpdateEvent

public AbstractDatabaseEvent createUpdateEvent(int tableId,
                                               String keyId,
                                               HttpServletRequest request,
                                               DbFormsConfig config)
Create and return a new UpdateEvent as secondary event.

Specified by:
createUpdateEvent in class AbstractDatabaseEventFactory
Parameters:
tableId - the table identifier
keyId - the key identifier
request - the HttpServletRequest object
config - the DbForms config object
Returns:
The updateEvent object

initializeEvents

protected void initializeEvents()
                         throws Exception
Initialize the default events.

Specified by:
initializeEvents in class AbstractEventFactory
Throws:
Exception - if any error occurs


Copyright © 2002-2006 DbForms. All Rights Reserved.