| java.lang.Object com.nabhinc.portlet.mvcportlet.core.BaseRequestProcessor com.nabhinc.portlet.mvcportlet.actionprocessor.DeleteRecord
DeleteRecord | public class DeleteRecord extends BaseRequestProcessor implements ActionProcessor(Code) | | Deletes a database record if an optional
SQL condition is satisfied.
Required configuration parameters
- sql - SQL used to delete desired record.
Optional configuration parameters
- check-sql - If this sql returns a record then the delete
sql will not be executed.
- params - Comma separated list of names of SQL parameters to be
inserted. In general, these are the request parameter names. The
following specialtokens are used to insert other values:
- $userName - Current user name returned by request.getRemoteUser()
- $currentDate - Today's date
- $$currentTimestamp - Current time
- param-types - Comma separated list of SQL parameter types. This
parameter must be specified if "params" are specified. Possible parameter
types are: VARCHAR, INTEGER, DECIMAL, BOOLEAN, SMALLINT, DATE,
TIME, TIMESTAMP, FLOAT, DOUBLE, ARRAY, BIGINT, BINARY, BIT,
BLOB, CHAR, CLOB, LONGVARBINARY, LONGVARCHAR, JAVA_OBJECT
author: Padmanabh Dabke author: (c) 2004 Nabh Information Systems, Inc. All Rights Reserved. |
init | public void init(Element config, ControllerPortletConfig cpConfig) throws PortletException(Code) | | Initialization.
Parameters: config - XML configuration element throws: PortletException - Thrown if sql parameter is not specified,"params" parameter is specified but corresponding "param-types"are not specified. |
process | public String process(ActionRequest request, ActionResponse response, ActionConfig config) throws PortletException, IOException(Code) | | Deletes a database record if an optional
SQL condition is satisfied.
Parameters: request - Action request Parameters: response - Action response Parameters: config - Action config "check_error" if check-sql returns a record, "success" otherwise. throws: PortletException - throws: IOException - |
|
|