com.jcorporate.expresso.services.controller.dbmaint
Class UpdateBase
java.lang.Object
com.jcorporate.expresso.core.controller.State
com.jcorporate.expresso.services.controller.dbmaint.DynamicCmd
com.jcorporate.expresso.services.controller.dbmaint.UpdateBase
- All Implemented Interfaces:
- Cloneable, Serializable
- Direct Known Subclasses:
- AddUpdate, UpdateDelete, UpdateUpdate
- public abstract class UpdateBase
- extends DynamicCmd
Base Class for posting add, delete and updating operations. This
functionality was previously carried out in the DBMaint.doPost().
Now extended by ADDsave, UPDATEsave and UPDATEdelete
method.
- Version:
- $Revision: 1.16 $ $Date: 2004/11/17 20:48:18 $
- Author:
- Michael Nash, contributions by Kevin King
- See Also:
- Serialized Form
|
Method Summary |
protected void |
saveBlob(String fieldName,
File value,
JDBCDataObject criteria)
Saves a BLOB field to the database |
protected void |
saveBlobFields(DataObject myDBObj)
Saves updated BLOB fields to the database table if there are any. |
protected void |
showKey(boolean withEditLink)
Display a table showing the key fields of this object and their
values. |
| Methods inherited from class com.jcorporate.expresso.services.controller.dbmaint.DynamicCmd |
addParams, decode, getControllerName, getCurrentDBObj, getDataObject, getFieldsParam, getFixedFields, getKeyParameter, getMyDataObject, getPageNumber, getSearchParam, initializeDBObj, isKeyField, retrieveMyDBObject, run, setFields, setFieldsParam, setMyDataObject, setSearchParam, showBlobViewLink, showEditLink, showEditLink, showOptions, showUserName |
| Methods inherited from class com.jcorporate.expresso.core.controller.State |
add, addAutoInput, addAutoInput, addAutoInput, addBlock, addError, addInput, addOptionalParameter, addOutput, addParameter, addParameter, addParameter, addRequiredParameter, addTransition, autoValidate, autoValidate, calculateHandlerName, checkMask, checkParamMasks, clearFormCache, clone, equals, getAttribute, getController, getControllerRequest, getControllerResponse, getDataContext, getDBController, getDBName, getDescription, getErrors, getErrorState, getErrorTransition, getFileName, getFormCache, getHandlerName, getInitParameter, getName, getObjectParameter, getOptionalParameters, getOptionalParametersList, getParameter, getParameters, getPatternMatcher, getRequiredParametersList, getResponse, getReturnToSender, getSession, getStateFormClass, getString, getString, getSuccessTransition, getUid, getUser, hashCode, isFileParameter, isParameter, isSecure, perform, saveErrors, setController, setDescription, setErrorState, setErrorTransition, setFormCache, setHandlerName, setMask, setMask, setMaskError, setName, setResponse, setReturnToSender, setSecure, setStateFormClass, setSuccessTransition, toString, transition |
UpdateBase
public UpdateBase()
UpdateBase
public UpdateBase(String code,
String descrip)
- Constructor
- Parameters:
code - The name of the state.descrip - The friendly name of the state
showKey
protected void showKey(boolean withEditLink)
throws DBException,
ControllerException
- Display a table showing the key fields of this object and their
values. Used to confirm add/delete/update operations to the user
- Parameters:
withEditLink - true if you want the edit link displayed for the key
- Throws:
DBException - If it is not possible to determine the keys
or their values
ControllerException
saveBlobFields
protected void saveBlobFields(DataObject myDBObj)
throws DBException
- Saves updated BLOB fields to the database table if there are any. The
way to tell if the field needs updating is that the BLOB field attribute
fileName equals something, which points to a new file that has been uploaded
[As parsed and set by DefaultAutoElement]
- Parameters:
myDBObj - The current DBObject to update/add For adding records, the
DBObject should already be added by the time this method is called.
- Throws:
DBException- See Also:
DefaultAutoElement.parseSingleInput(com.jcorporate.expresso.core.controller.ControllerRequest, com.jcorporate.expresso.core.dataobjects.DataObject, java.lang.String, java.lang.String, com.jcorporate.expresso.core.controller.ErrorCollection)
saveBlob
protected void saveBlob(String fieldName,
File value,
JDBCDataObject criteria)
throws DBException
- Saves a BLOB field to the database
- Parameters:
fieldName - the field Name to savevalue - A java.io.File object representing the file to send to the
database.criteria - The current DBObject we are operating on.
- Throws:
DBException
Please see www.jcorporate.com for information about new Expresso releases.