com.jcorporate.expresso.services.controller.dbmaint
Class GetBase
java.lang.Object
com.jcorporate.expresso.core.controller.State
com.jcorporate.expresso.services.controller.dbmaint.DynamicCmd
com.jcorporate.expresso.services.controller.dbmaint.GetBase
- All Implemented Interfaces:
- Cloneable, Serializable
- Direct Known Subclasses:
- Add, Search, Update
- public abstract class GetBase
- extends DynamicCmd
Base class for search/add & update operations that
were previously carried out in DBMaint.doGet().
- Author:
- Michael Nash, contributions by Kevin King
- See Also:
- Serialized Form
|
Method Summary |
protected void |
addLookupTransition(DataObjectMetaData metadata,
Input oneField,
String oneFieldName)
Adds the lookup transition if the target is a DataObject. |
protected abstract void |
autoField(String oneFieldName)
implemented by subclass |
protected String |
displayValue(String fieldType,
String fieldValue)
Format a value for display in the HTML being returned to the client |
protected void |
showForm()
Show the HTML form to the user - this form may be for add/update or
search and may or may not be populated with data when presented to the user.
|
| 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 |
GetBase
public GetBase()
GetBase
public GetBase(String code,
String descrip)
- Parameters:
code - internal state name constructordescrip - Friendly name of the state.
autoField
protected abstract void autoField(String oneFieldName)
throws DBException,
ControllerException
- implemented by subclass
- Parameters:
oneFieldName - the field name to bring up the field
- Throws:
DBException - upon error communicating with the DBObject.
ControllerException - upon other errors
displayValue
protected String displayValue(String fieldType,
String fieldValue)
throws DBException
- Format a value for display in the HTML being returned to the client
- Parameters:
fieldType - The type of the field to formatfieldValue - The value of the field
- Returns:
- String The formatted field
- Throws:
DBException - If the field format information could not be
determined
addLookupTransition
protected void addLookupTransition(DataObjectMetaData metadata,
Input oneField,
String oneFieldName)
throws DBException
- Adds the lookup transition if the target is a DataObject. And a lookup
object is specified. Otherwise, it skips the lookup item.
- Parameters:
metadata - the object's metadataoneField - the input to have a nested transition added to if valid.oneFieldName - the name of the field to check
- Throws:
DBException - upon error
showForm
protected void showForm()
throws DBException,
ControllerException
- Show the HTML form to the user - this form may be for add/update or
search and may or may not be populated with data when presented to the user.
The descendant of this class must defined this method to show the
necessary input form for the user to key in either record data or criteria f
or a search. An existing record (if any) will be populated in myDBObj
- Throws:
DBException - If a problem occurs with the database connection
ControllerException
Please see www.jcorporate.com for information about new Expresso releases.