Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » acting » modular » [javadoc | source]
org.apache.cocoon.acting.modular
public class: DatabaseUpdateAction [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.acting.AbstractAction
         org.apache.cocoon.acting.AbstractConfigurableAction
            org.apache.cocoon.acting.ConfigurableServiceableAction
               org.apache.cocoon.acting.AbstractComplementaryConfigurableAction
                  org.apache.cocoon.acting.modular.DatabaseAction
                     org.apache.cocoon.acting.modular.DatabaseUpdateAction

All Implemented Interfaces:
    org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, Action

Updates a record in a database. The action can update one or more tables, and can update more than one row to a table at a time.
Fields inherited from org.apache.cocoon.acting.modular.DatabaseAction:
MODE_AUTOINCR,  MODE_OTHERS,  MODE_OUTPUT,  ATTRIBUTE_KEY,  inputHint,  outputHint,  databaseHint,  INPUT_MODULE_SELECTOR,  OUTPUT_MODULE_SELECTOR,  DATABASE_MODULE_SELECTOR,  dbselector,  defaultModeNames,  cachedQueryData,  pathSeparator,  firstRow,  failOnEmpty
Fields inherited from org.apache.cocoon.acting.ConfigurableServiceableAction:
manager
Fields inherited from org.apache.cocoon.acting.AbstractConfigurableAction:
settings
Fields inherited from org.apache.cocoon.acting.AbstractAction:
EMPTY_MAP
Method from org.apache.cocoon.acting.modular.DatabaseUpdateAction Summary:
getColumnValues,   getQuery,   honourAutoIncrement,   processRow,   selectMode
Methods from org.apache.cocoon.acting.modular.DatabaseAction:
act,   configure,   dispose,   fillModes,   getColumnValue,   getColumnValues,   getDataSource,   getMode,   getOutputName,   getOutputName,   getQuery,   honourAutoIncrement,   isLargeObject,   processRow,   processTable,   selectMode,   service,   setColumn,   setColumn,   setOutput,   setOutputAttribute
Methods from org.apache.cocoon.acting.AbstractComplementaryConfigurableAction:
getConfiguration,   getConfiguration,   getConfiguration
Methods from org.apache.cocoon.acting.ConfigurableServiceableAction:
service
Methods from org.apache.cocoon.acting.AbstractConfigurableAction:
configure
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.acting.modular.DatabaseUpdateAction Detail:
 protected Object[][] getColumnValues(Configuration tableConf,
    CacheHelper queryData,
    Map objectModel) throws ConfigurationException, ServiceException 
    Fetch all values for all columns that are needed to do the database operation.
 protected CacheHelper getQuery(Configuration table,
    Map modeTypes,
    Map defaultModeNames) throws ConfigurationException, ServiceException 
    Get the String representation of the PreparedStatement. This is mapped to the Configuration object itself, so if it doesn't exist, it will be created.
 protected boolean honourAutoIncrement() 
    determine whether autoincrement columns should be honoured by this operation. This is usually snsible only for INSERTs.
 protected int processRow(Map objectModel,
    Connection conn,
    PreparedStatement statement,
    String outputMode,
    Configuration table,
    CacheHelper queryData,
    Object[][] columnValues,
    int rowIndex,
    Map results) throws Exception, SQLException, ConfigurationException 
    set all necessary ?s and execute the query
 protected String selectMode(boolean isAutoIncrement,
    Map modes) 
    determine which mode to use as default mode here: UPDATE highly specific to operation INSERT / UPDATE / DELETE / SELECT