Business Components

oracle.jdeveloper.servlet
Class DbServletImpl

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--oracle.jdeveloper.servlet.DbServletImpl

public class DbServletImpl
extends javax.servlet.http.HttpServlet
implements DbServlet

A class representing a DbServlet implementation

Version:
INTERNAL
See Also:
Serialized Form

Fields inherited from interface oracle.jdeveloper.servlet.DbServlet
CLEAR_QUERY_CONDITIONS, EXECUTE_COMMIT_CHANGES, EXECUTE_DELETE_ROW, EXECUTE_EDIT_FORM, EXECUTE_INSERT_FORM, EXECUTE_LOGIN_FORM, EXECUTE_LOGOUT, EXECUTE_QUERY_FORM, EXECUTE_ROLLBACK_CHANGES, GENERATE_CUSTOM_FORM, GENERATE_EDIT_FORM, GENERATE_INSERT_FORM, GENERATE_LOGIN_FORM, GENERATE_QUERY_FORM, GENERATE_VIEW_FORM, GOTO_CURRENT_RECORD, GOTO_FIRST_RECORD, GOTO_LAST_RECORD, GOTO_NEXT_PAGE, GOTO_NEXT_RECORD, GOTO_PREV_PAGE, GOTO_PREV_RECORD, GOTO_RECORD_NUMBER, SAVE_QUERY_CONDITION, SHOW_LONG_ATTRIBUTE
 
Constructor Summary
DbServletImpl()
           
 
Method Summary
 void clearQueryConditions(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void CommitChanges(UserSession context)
          Commit changes.
 void commitChangesAndResetContext(UserSession context)
           
 void connect(UserSession context, java.lang.String jdbcConnectString)
          Connect to the database.
 void disconnect(UserSession context)
          Disconnect from the database.
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void dumpParameters(javax.servlet.http.HttpServletRequest req)
           
 void executeCommitChanges(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This method is called when the user applies any changes.
 void executeDeleteForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Executes a POSTed Delete form.
 void executeEditForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Executes a POSTed Edit Form.
 void executeInsertForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Executes a POSTed New Record (Insert) Form.
 void executeLoginPage(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Create a new session to the database using the provided username and password.
 void executeLogout(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This is called when the user logs out of the database session.
 void executeQueryForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Executes a POSTed Find (Query) Form and calls generateBrowseForm() to produce the query results.
 void executeRollbackChanges(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This is called when the user cancels any changes.
 void generateEditForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Generates the Edit Form.
 void generateInsertForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Generates the New Record (Insert) Form.
 void generateLoginPage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Generates the servlet's Login Form.
 void generateQueryErrorForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void generateQueryForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Generates the HTML user interface for the Find (Query) Form.
 void generateViewForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Generates a View Form.
 java.lang.String getAppName()
          Gets the file path to the database servlet's runtime deployment XML file.
 boolean getAutoCommit()
          Returns true if automatic commit is enable, false otherwise.
 java.lang.String getDbHostName()
          Returns the database connection string.
 HTMLDiv getDetailEditForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the DIV that represents the detail table's row set edit view.
 java.lang.String getDetailEntityName()
          Gets the detail table's entity name.
 HTMLDiv getDetailInsertForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the DIV that represents the detail table's new row.
 java.lang.StringBuffer getDetailTableColumns()
          Gets the SELECT column list used on the detail table.
 java.lang.String getDetailTableName()
          Gets the detail table's name.
 java.lang.String getDetailTableOrderByClause()
          Gets the detail table's ORDER BY clause.
 java.lang.StringBuffer getDetailTableWhereClause()
          Gets the detail table's WHERE clause entry.
 HTMLToolBar getDetailToolBar(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the toolbar to be displayed for the detail table.
 HTMLDiv getDetailViewForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the DIV that represents the detail table's row set view.
 oracle.jdeveloper.servlet.FormFieldDef getEditFormField(javax.servlet.http.HttpServletRequest req, java.lang.String sTable, java.lang.String sColName, java.lang.String sValue)
           
 java.lang.String getImageDirectory()
          Gets the relative URL path to the servlet's images directory.
 java.lang.String getLinkName()
          Gets the association name (link) that the servlet uses to synchronize the master and detail result sets.
 int getLockingMode()
          Gets the locking mode.
 HTMLDiv getMasterEditForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the DIV that represents the master table's row edit.
 java.lang.String getMasterEntityName()
          Gets the master table's entity name.
 HTMLDiv getMasterInsertForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the DIV that represents the master table's new row.
 java.lang.StringBuffer getMasterTableColumns()
          Gets the SELECT column list used on the master table.
 java.lang.String getMasterTableName()
          Gets the master table's name
 java.lang.String getMasterTableOrderByClause()
          Gets the master table's ORDER BY clause.
 java.lang.StringBuffer getMasterTableWhereClause()
          Gets the master table's WHERE clause entry.
 HTMLToolBar getMasterToolBar(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the toolbar to be displayed for the master table.
 HTMLDiv getMasterViewForm(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the DIV that represents the master table's row view.
 java.lang.String getServletInfo()
           
 java.lang.String getServletName()
          Gets the servlet's name as registered with the web server.
 java.lang.String getServletTitle()
          Gets the servlet title displayed by the Login Form.
 boolean getShowLoginDialog()
          Returns true if the Login Form is displayed when the servlet executes, and false if it is not displayed.
 java.lang.String getStyleSheet()
          Gets the current value of the Cascading Style Sheet (CSS) associated with this servlet.
 java.lang.String getUserName()
          Gets the user name.
 java.lang.String getUserPassword()
          Gets the user password.
 oracle.jdeveloper.servlet.FormFieldDef getViewFormField(javax.servlet.http.HttpServletRequest req, java.lang.String sTable, java.lang.String sColName, java.lang.String sValue)
           
 void handleCustomRequest(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This method is called when the servlet receives a URL POST/GET that it does not understand.
 void init(javax.servlet.ServletConfig config)
           
 void initializeDbServlet()
          Initializes the servlet.
 boolean isHiddenAttribute(java.lang.String sView, java.lang.String sCol)
           
 boolean isMasterDetail()
          Returns true if the servlet is in master-detail mode, and false if single-table mode.
 void reportException(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.Exception ex)
          This method generates the HTML user interface that reports an Exception.
 void returnLongAttributeData(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Returns the data for a long attribute column.
 void RollbackChanges(UserSession context)
          Rollback changes.
 void rollbackChangesAndResetContext(UserSession context)
           
 void saveQueryDefinition(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 boolean saveRowEdits(UserSession context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void setAppName(java.lang.String sAppName)
          Sets the file path to the servlet's runtime deployment XML file.
 void setAutoCommit(boolean bSet)
          Enables or disables automatic commit of changes.
 void setDbHostName(java.lang.String sHost)
          Sets the servlet's database connection string.
 void setDetailDisplayRows(int nRows)
           
 void setDetailEntityName(java.lang.String sName)
          Sets the detail table's entity name.
 void setDetailTableColumns(java.lang.StringBuffer sColumns)
          Sets the SELECT column list to be used on the detail table.
 void setDetailTableKeyColumns(java.lang.String sCols)
          Sets the list of detail table primary key columns that are to be retrieved, but not made visible in the generated HTML forms.
 void setDetailTableName(java.lang.String sName)
          Sets the detail table's name Example: setDetailTableName("EMP");
 void setDetailTableOrderByClause(java.lang.String sOrderBy)
          Sets the detail table's ORDER BY clause.
 void setDetailTableWhereClause(java.lang.StringBuffer sWhere)
          Sets the detail table's WHERE clause entry.
 void setImageDirectory(java.lang.String sDir)
          Sets the relative URL path to the servlet's images directory.
 void setLinkName(java.lang.String sLinkName)
          Sets the association name (link) that the servlet uses to synchronize the master and detail result sets.
 void setLockingMode(int mode)
          Sets the locking mode.
 void setMasterDetail(boolean bValue)
          Sets the servlet's state to master-detail.
 void setMasterEntityName(java.lang.String sName)
          Sets the master table's entity name.
 void setMasterTableColumns(java.lang.StringBuffer sColumns)
          Sets the SELECT column list to be used on the master table.
 void setMasterTableKeyColumns(java.lang.String sCols)
          Sets the list of master-table primary key columns that are to be retrieved, but not made visible in the generated HTML forms.
 void setMasterTableName(java.lang.String sName)
          Sets the master table's name.
 void setMasterTableOrderByClause(java.lang.String sOrderBy)
          Sets the master table's ORDER BY clause.
 void setMasterTableWhereClause(java.lang.StringBuffer sWhere)
          Sets the master table's WHERE clause entry.
 void setServletName(java.lang.String sValue)
          Sets the servlet's name as registered with the web server.
 void setServletTitle(java.lang.String sValue)
          Sets the servlet title displayed by the Login Form.
 void setShowLoginDialog(boolean bShow)
          Sets whether or not to display the Login Form when the servlet executes.
 void setStyleSheet(java.lang.String sPath)
          Sets the URL path to the Cascading Style Sheet (CSS) that defines the style (look and feel) of the servlet's generated HTML pages.
 void setUserName(java.lang.String sName)
          Sets the user name.
 void setUserPassword(java.lang.String sValue)
          Sets the user password.
 boolean shouldReportException(java.lang.Exception ex)
          This method is called prior to the servlet reporting an exception.
 void SyncChanges(UserSession context)
          Synchronize changes.
 void updateCurrency(UserSession context)
           
 void updateDetailCurrency(UserSession context)
           
 void updateMasterCurrency(UserSession context)
           
 void updateRowsetCurrency(UserSession context, RowSetIterator qView, java.lang.String sRowOperation)
           
 void useHiddenField(java.lang.String sName)
          Use this method to specify the hidden field type of the generated HTML form.
 void useMimeType(java.lang.String sName, java.lang.String sPrompt, java.lang.String sMimeType, boolean bShowInline)
          Use this hint to configure a database field to be displayed by the browser using the given MIME type.
 void useSelectField(java.lang.String sName, java.lang.String sPrompt, java.lang.String sClass, java.lang.String[] sValues)
          Use this method to specify the field types for combo box controls of the generated HTML form.
 void useTextArea(java.lang.String sName, java.lang.String sPrompt, java.lang.String sWidth, java.lang.String sHeight, java.lang.String sClass, java.lang.String sMaxLength)
          Use this method to specify the text area types for multi-line edit controls of the generated HTML form.
 void useTextField(java.lang.String sName, java.lang.String sPrompt, java.lang.String sWidth, java.lang.String sClass, java.lang.String sMaxLength)
          Use this method to specify the text field types for single-line edit controls of the generated HTML form.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbServletImpl

public DbServletImpl()
Method Detail

setServletTitle

public void setServletTitle(java.lang.String sValue)
Description copied from interface: DbServlet
Sets the servlet title displayed by the Login Form. Example: setServletTitle("Master-Detail Database Servlet");
Specified by:
setServletTitle in interface DbServlet

getServletTitle

public java.lang.String getServletTitle()
Description copied from interface: DbServlet
Gets the servlet title displayed by the Login Form.
Specified by:
getServletTitle in interface DbServlet

setDetailDisplayRows

public void setDetailDisplayRows(int nRows)

setShowLoginDialog

public void setShowLoginDialog(boolean bShow)
Description copied from interface: DbServlet
Sets whether or not to display the Login Form when the servlet executes. Example: setShowLoginDialog(true);
Specified by:
setShowLoginDialog in interface DbServlet

getShowLoginDialog

public boolean getShowLoginDialog()
Description copied from interface: DbServlet
Returns true if the Login Form is displayed when the servlet executes, and false if it is not displayed.
Specified by:
getShowLoginDialog in interface DbServlet

dumpParameters

public void dumpParameters(javax.servlet.http.HttpServletRequest req)

connect

public void connect(UserSession context,
                    java.lang.String jdbcConnectString)
             throws java.lang.Exception
Description copied from interface: DbServlet
Connect to the database.
Specified by:
connect in interface DbServlet

disconnect

public void disconnect(UserSession context)
Description copied from interface: DbServlet
Disconnect from the database.
Specified by:
disconnect in interface DbServlet

CommitChanges

public void CommitChanges(UserSession context)
                   throws java.lang.Exception
Description copied from interface: DbServlet
Commit changes.
Specified by:
CommitChanges in interface DbServlet

RollbackChanges

public void RollbackChanges(UserSession context)
                     throws java.lang.Exception
Description copied from interface: DbServlet
Rollback changes.
Specified by:
RollbackChanges in interface DbServlet

SyncChanges

public void SyncChanges(UserSession context)
                 throws java.lang.Exception
Description copied from interface: DbServlet
Synchronize changes. Any changes in the result sets are flushed to the server and server updates are retrieved.
Specified by:
SyncChanges in interface DbServlet

commitChangesAndResetContext

public void commitChangesAndResetContext(UserSession context)
                                  throws java.lang.Exception

rollbackChangesAndResetContext

public void rollbackChangesAndResetContext(UserSession context)
                                    throws java.lang.Exception

updateCurrency

public void updateCurrency(UserSession context)
                    throws java.lang.Exception

updateMasterCurrency

public void updateMasterCurrency(UserSession context)
                          throws java.lang.Exception

updateDetailCurrency

public void updateDetailCurrency(UserSession context)
                          throws java.lang.Exception

updateRowsetCurrency

public void updateRowsetCurrency(UserSession context,
                                 RowSetIterator qView,
                                 java.lang.String sRowOperation)
                          throws java.lang.Exception

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet

initializeDbServlet

public void initializeDbServlet()
Description copied from interface: DbServlet
Initializes the servlet. This method is generated by the DBServlet Wizard, and is called by the DbServletImpl constructor.
Specified by:
initializeDbServlet in interface DbServlet

setAutoCommit

public void setAutoCommit(boolean bSet)
Description copied from interface: DbServlet
Enables or disables automatic commit of changes.
Specified by:
setAutoCommit in interface DbServlet

getLockingMode

public int getLockingMode()
Description copied from interface: DbServlet
Gets the locking mode.
Specified by:
getLockingMode in interface DbServlet

setLockingMode

public void setLockingMode(int mode)
Description copied from interface: DbServlet
Sets the locking mode.
Specified by:
setLockingMode in interface DbServlet

getAutoCommit

public boolean getAutoCommit()
Description copied from interface: DbServlet
Returns true if automatic commit is enable, false otherwise.
Specified by:
getAutoCommit in interface DbServlet

getUserName

public java.lang.String getUserName()
Description copied from interface: DbServlet
Gets the user name.
Specified by:
getUserName in interface DbServlet

setUserName

public void setUserName(java.lang.String sName)
Description copied from interface: DbServlet
Sets the user name.
Specified by:
setUserName in interface DbServlet

getUserPassword

public java.lang.String getUserPassword()
Description copied from interface: DbServlet
Gets the user password.
Specified by:
getUserPassword in interface DbServlet

setUserPassword

public void setUserPassword(java.lang.String sValue)
Description copied from interface: DbServlet
Sets the user password.
Specified by:
setUserPassword in interface DbServlet

setStyleSheet

public void setStyleSheet(java.lang.String sPath)
Description copied from interface: DbServlet
Sets the URL path to the Cascading Style Sheet (CSS) that defines the style (look and feel) of the servlet's generated HTML pages. The DbServlet framework defines the HTML structure and tags HTML items with CSS class names. Example: setStyleSheet("/dbservlet/css/aqua.css");
Specified by:
setStyleSheet in interface DbServlet

getStyleSheet

public java.lang.String getStyleSheet()
Description copied from interface: DbServlet
Gets the current value of the Cascading Style Sheet (CSS) associated with this servlet. The CSS defines the style (look and feel) of the servlet's generated HTML pages
Specified by:
getStyleSheet in interface DbServlet

getDbHostName

public java.lang.String getDbHostName()
Description copied from interface: DbServlet
Returns the database connection string.
Specified by:
getDbHostName in interface DbServlet

setDbHostName

public void setDbHostName(java.lang.String sHost)
Description copied from interface: DbServlet
Sets the servlet's database connection string. The default value for this string is localhost:1521:ORCL. Example: setDbHostName("jdbc:oracle:thin:@localhost:1521:ORCL");
Specified by:
setDbHostName in interface DbServlet

setImageDirectory

public void setImageDirectory(java.lang.String sDir)
Description copied from interface: DbServlet
Sets the relative URL path to the servlet's images directory. Example, when the servlet generates the navigation toolbar, it looks in this directory for the necessary images. Example: setImageDirectory("/dbservlet/images");
Specified by:
setImageDirectory in interface DbServlet

getImageDirectory

public java.lang.String getImageDirectory()
Description copied from interface: DbServlet
Gets the relative URL path to the servlet's images directory.
Specified by:
getImageDirectory in interface DbServlet

setAppName

public void setAppName(java.lang.String sAppName)
Description copied from interface: DbServlet
Sets the file path to the servlet's runtime deployment XML file. This file specifies which tables, associations, and so on, are used by the servlet. The XML file is named based on the database connection name defined using the Connection Wizard. Example: setAppName("MyDBConnection");
Specified by:
setAppName in interface DbServlet

getAppName

public java.lang.String getAppName()
Description copied from interface: DbServlet
Gets the file path to the database servlet's runtime deployment XML file.
Specified by:
getAppName in interface DbServlet

setServletName

public void setServletName(java.lang.String sValue)
Description copied from interface: DbServlet
Sets the servlet's name as registered with the web server. Each servlet running within the same web server must have a unique name. For the Java Web Server, you register your servlet using the web server's Adminstration Tool. All the URL paths that are generated refer to this name to target the servlet in subsequent requests. Example: setServletName("/servlet/MyMDServlet");
Specified by:
setServletName in interface DbServlet

getServletName

public java.lang.String getServletName()
Description copied from interface: DbServlet
Gets the servlet's name as registered with the web server.
Specified by:
getServletName in interface DbServlet

setLinkName

public void setLinkName(java.lang.String sLinkName)
Description copied from interface: DbServlet
Sets the association name (link) that the servlet uses to synchronize the master and detail result sets. This name refers to the the master-detail entry stored in the deployment runtime XML file. This method call is generated by the DBServlet Wizard. DO NOT EDIT THIS METHOD. Example: setLinkName("MyPackage.FK_DEPTNO_ASSOC");
Specified by:
setLinkName in interface DbServlet

getLinkName

public java.lang.String getLinkName()
Description copied from interface: DbServlet
Gets the association name (link) that the servlet uses to synchronize the master and detail result sets.
Specified by:
getLinkName in interface DbServlet

setMasterTableColumns

public void setMasterTableColumns(java.lang.StringBuffer sColumns)
Description copied from interface: DbServlet
Sets the SELECT column list to be used on the master table. Example: StringBuffer sMasterColumns = new StringBuffer(); sMasterColumns.append("DEPTNO"); sMasterColumns.append(","); sMasterColumns.append("DNAME"); sMasterColumns.append(","); sMasterColumns.append("LOC"); setMasterTableColumns(sMasterColumns);
Specified by:
setMasterTableColumns in interface DbServlet

getMasterTableColumns

public java.lang.StringBuffer getMasterTableColumns()
Description copied from interface: DbServlet
Gets the SELECT column list used on the master table.
Specified by:
getMasterTableColumns in interface DbServlet

setMasterTableName

public void setMasterTableName(java.lang.String sName)
Description copied from interface: DbServlet
Sets the master table's name. Example: setMasterTableName("DEPT");
Specified by:
setMasterTableName in interface DbServlet

setMasterEntityName

public void setMasterEntityName(java.lang.String sName)
Description copied from interface: DbServlet
Sets the master table's entity name. DO NOT EDIT THIS METHOD. Example: setMasterEntityName("MyPackage.DEPT");
Specified by:
setMasterEntityName in interface DbServlet

getMasterEntityName

public java.lang.String getMasterEntityName()
Description copied from interface: DbServlet
Gets the master table's entity name.
Specified by:
getMasterEntityName in interface DbServlet

getMasterTableName

public java.lang.String getMasterTableName()
Description copied from interface: DbServlet
Gets the master table's name
Specified by:
getMasterTableName in interface DbServlet

setMasterTableWhereClause

public void setMasterTableWhereClause(java.lang.StringBuffer sWhere)
Description copied from interface: DbServlet
Sets the master table's WHERE clause entry. Use this to restrict the result set. Example: setMasterTableWhereClause(new StringBuffer("DEPTNO > 20"));
Specified by:
setMasterTableWhereClause in interface DbServlet

getMasterTableWhereClause

public java.lang.StringBuffer getMasterTableWhereClause()
Description copied from interface: DbServlet
Gets the master table's WHERE clause entry.
Specified by:
getMasterTableWhereClause in interface DbServlet

setMasterTableOrderByClause

public void setMasterTableOrderByClause(java.lang.String sOrderBy)
Description copied from interface: DbServlet
Sets the master table's ORDER BY clause. Example: setMasterTableOrderByClause(new StringBuffer("DEPTNO ASC"));
Specified by:
setMasterTableOrderByClause in interface DbServlet

getMasterTableOrderByClause

public java.lang.String getMasterTableOrderByClause()
Description copied from interface: DbServlet
Gets the master table's ORDER BY clause.
Specified by:
getMasterTableOrderByClause in interface DbServlet

setDetailTableColumns

public void setDetailTableColumns(java.lang.StringBuffer sColumns)
Description copied from interface: DbServlet
Sets the SELECT column list to be used on the detail table. Example: StringBuffer sDetailColumns = new StringBuffer(); sDetailColumns.append("EMPNO"); sDetailColumns.append(","); sDetailColumns.append("ENAME"); sDetailColumns.append(","); sDetailColumns.append("JOB"); setDetailTableColumns(sDetailColumns);
Specified by:
setDetailTableColumns in interface DbServlet

getDetailTableColumns

public java.lang.StringBuffer getDetailTableColumns()
Description copied from interface: DbServlet
Gets the SELECT column list used on the detail table.
Specified by:
getDetailTableColumns in interface DbServlet

setDetailTableName

public void setDetailTableName(java.lang.String sName)
Description copied from interface: DbServlet
Sets the detail table's name Example: setDetailTableName("EMP");
Specified by:
setDetailTableName in interface DbServlet

setDetailEntityName

public void setDetailEntityName(java.lang.String sName)
Description copied from interface: DbServlet
Sets the detail table's entity name. DO NOT EDIT THIS METHOD. Example: setDetailEntityName("MyPackage.EMP");
Specified by:
setDetailEntityName in interface DbServlet

getDetailEntityName

public java.lang.String getDetailEntityName()
Description copied from interface: DbServlet
Gets the detail table's entity name.
Specified by:
getDetailEntityName in interface DbServlet

getDetailTableName

public java.lang.String getDetailTableName()
Description copied from interface: DbServlet
Gets the detail table's name.
Specified by:
getDetailTableName in interface DbServlet

setDetailTableWhereClause

public void setDetailTableWhereClause(java.lang.StringBuffer sWhere)
Description copied from interface: DbServlet
Sets the detail table's WHERE clause entry. Use this to restrict the result set. Example: setDetailTableWhereClause(new StringBuffer("EMPNO = 10"));
Specified by:
setDetailTableWhereClause in interface DbServlet

getDetailTableWhereClause

public java.lang.StringBuffer getDetailTableWhereClause()
Description copied from interface: DbServlet
Gets the detail table's WHERE clause entry.
Specified by:
getDetailTableWhereClause in interface DbServlet

setDetailTableOrderByClause

public void setDetailTableOrderByClause(java.lang.String sOrderBy)
Description copied from interface: DbServlet
Sets the detail table's ORDER BY clause. Example: setDetailTableOrderByClause(new StringBuffer("SAL DESC"));
Specified by:
setDetailTableOrderByClause in interface DbServlet

getDetailTableOrderByClause

public java.lang.String getDetailTableOrderByClause()
Description copied from interface: DbServlet
Gets the detail table's ORDER BY clause.
Specified by:
getDetailTableOrderByClause in interface DbServlet

setMasterDetail

public void setMasterDetail(boolean bValue)
Description copied from interface: DbServlet
Sets the servlet's state to master-detail. This method is generated by the DBServlet Wizard. Example: setMasterDetail(true);
Specified by:
setMasterDetail in interface DbServlet

isMasterDetail

public boolean isMasterDetail()
Description copied from interface: DbServlet
Returns true if the servlet is in master-detail mode, and false if single-table mode.
Specified by:
isMasterDetail in interface DbServlet

setMasterTableKeyColumns

public void setMasterTableKeyColumns(java.lang.String sCols)
Description copied from interface: DbServlet
Sets the list of master-table primary key columns that are to be retrieved, but not made visible in the generated HTML forms. Note: To make a read-only VIEW-based HTML form, delete the ROWID value in this method and setDetailTableKeyColumns. For example: setMasterTableKeyColumns("DEPTNO");
Specified by:
setMasterTableKeyColumns in interface DbServlet

setDetailTableKeyColumns

public void setDetailTableKeyColumns(java.lang.String sCols)
Description copied from interface: DbServlet
Sets the list of detail table primary key columns that are to be retrieved, but not made visible in the generated HTML forms. Note: To make a read-only VIEW-based HTML form, delete the ROWID value in this method and setMasterTableKeyColumns. For example: setDetailTableKeyColumns("DEPTNO");
Specified by:
setDetailTableKeyColumns in interface DbServlet

isHiddenAttribute

public boolean isHiddenAttribute(java.lang.String sView,
                                 java.lang.String sCol)

executeLoginPage

public void executeLoginPage(UserSession context,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.lang.Exception
Description copied from interface: DbServlet
Create a new session to the database using the provided username and password.
Specified by:
executeLoginPage in interface DbServlet

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
            throws javax.servlet.ServletException,
                   java.io.IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
           throws javax.servlet.ServletException,
                  java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet

getServletInfo

public java.lang.String getServletInfo()
Overrides:
getServletInfo in class javax.servlet.GenericServlet

generateLoginPage

public void generateLoginPage(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse res)
                       throws java.lang.Exception
Description copied from interface: DbServlet
Generates the servlet's Login Form. You can override this method to customize the Login Form. See the Database Servlet online documentation for details.
Specified by:
generateLoginPage in interface DbServlet

shouldReportException

public boolean shouldReportException(java.lang.Exception ex)
Description copied from interface: DbServlet
This method is called prior to the servlet reporting an exception. Override this method to decide whether to have the servlet report and exception to the user.
Specified by:
shouldReportException in interface DbServlet

reportException

public void reportException(javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res,
                            java.lang.Exception ex)
Description copied from interface: DbServlet
This method generates the HTML user interface that reports an Exception. Override this method to provide your own implementation.
Specified by:
reportException in interface DbServlet

saveQueryDefinition

public void saveQueryDefinition(UserSession context,
                                javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res)
                         throws java.lang.Exception

clearQueryConditions

public void clearQueryConditions(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception

generateQueryForm

public void generateQueryForm(UserSession context,
                              javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse res)
                       throws java.lang.Exception
Description copied from interface: DbServlet
Generates the HTML user interface for the Find (Query) Form. Override this method to customize this form. See the Database Servlet online documentation for details.
Specified by:
generateQueryForm in interface DbServlet

executeQueryForm

public void executeQueryForm(UserSession context,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.lang.Exception
Description copied from interface: DbServlet
Executes a POSTed Find (Query) Form and calls generateBrowseForm() to produce the query results. Override this method to process any POSTed query forms.
Specified by:
executeQueryForm in interface DbServlet

generateQueryErrorForm

public void generateQueryErrorForm(UserSession context,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception

getMasterToolBar

public HTMLToolBar getMasterToolBar(UserSession context,
                                    javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws java.lang.Exception
Description copied from interface: DbServlet
Returns the toolbar to be displayed for the master table.
Specified by:
getMasterToolBar in interface DbServlet

getDetailToolBar

public HTMLToolBar getDetailToolBar(UserSession context,
                                    javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws java.lang.Exception
Description copied from interface: DbServlet
Returns the toolbar to be displayed for the detail table.
Specified by:
getDetailToolBar in interface DbServlet

getMasterViewForm

public HTMLDiv getMasterViewForm(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Description copied from interface: DbServlet
Returns the DIV that represents the master table's row view.
Specified by:
getMasterViewForm in interface DbServlet

getMasterEditForm

public HTMLDiv getMasterEditForm(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Description copied from interface: DbServlet
Returns the DIV that represents the master table's row edit.
Specified by:
getMasterEditForm in interface DbServlet

getMasterInsertForm

public HTMLDiv getMasterInsertForm(UserSession context,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception
Description copied from interface: DbServlet
Returns the DIV that represents the master table's new row.
Specified by:
getMasterInsertForm in interface DbServlet

getDetailViewForm

public HTMLDiv getDetailViewForm(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Description copied from interface: DbServlet
Returns the DIV that represents the detail table's row set view.
Specified by:
getDetailViewForm in interface DbServlet

generateViewForm

public void generateViewForm(UserSession context,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.lang.Exception
Description copied from interface: DbServlet
Generates a View Form. This row viewing form is read-only. In master-detail mode, it displays both the master and detail result sets. It displays the master table in a row viewing form and the detail table in a browse form. Override this method to customize this form. See the Database Servlet online documentation for details.
Specified by:
generateViewForm in interface DbServlet

getDetailEditForm

public HTMLDiv getDetailEditForm(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Description copied from interface: DbServlet
Returns the DIV that represents the detail table's row set edit view.
Specified by:
getDetailEditForm in interface DbServlet

getDetailInsertForm

public HTMLDiv getDetailInsertForm(UserSession context,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception
Description copied from interface: DbServlet
Returns the DIV that represents the detail table's new row.
Specified by:
getDetailInsertForm in interface DbServlet

returnLongAttributeData

public void returnLongAttributeData(UserSession context,
                                    javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws java.lang.Exception
Description copied from interface: DbServlet
Returns the data for a long attribute column.
Specified by:
returnLongAttributeData in interface DbServlet

generateEditForm

public void generateEditForm(UserSession context,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.lang.Exception
Description copied from interface: DbServlet
Generates the Edit Form. This form is used for editing existing and newly-inserted rows. The generateInsertForm() method subsequently calls this method after inserting a row into the result set. Override this method to customize this form. See the Database Servlet online documentation for details.
Specified by:
generateEditForm in interface DbServlet

saveRowEdits

public boolean saveRowEdits(UserSession context,
                            javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)
Specified by:
saveRowEdits in interface DbServlet

executeEditForm

public void executeEditForm(UserSession context,
                            javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)
                     throws java.lang.Exception
Description copied from interface: DbServlet
Executes a POSTed Edit Form. To validate row edits, override the saveRowEdits() method.
Specified by:
executeEditForm in interface DbServlet

executeDeleteForm

public void executeDeleteForm(UserSession context,
                              javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse res)
                       throws java.lang.Exception
Description copied from interface: DbServlet
Executes a POSTed Delete form. To validate row edits, override the saveRowEdits() method.
Specified by:
executeDeleteForm in interface DbServlet

generateInsertForm

public void generateInsertForm(UserSession context,
                               javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse res)
                        throws java.lang.Exception
Description copied from interface: DbServlet
Generates the New Record (Insert) Form. This method first creates a new row and then calls generateRowEditingForm().
Specified by:
generateInsertForm in interface DbServlet

executeInsertForm

public void executeInsertForm(UserSession context,
                              javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse res)
                       throws java.lang.Exception
Description copied from interface: DbServlet
Executes a POSTed New Record (Insert) Form. To validate any row edits, override the saveRowEdits() method.
Specified by:
executeInsertForm in interface DbServlet

handleCustomRequest

public void handleCustomRequest(UserSession context,
                                javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res)
                         throws java.lang.Exception
Description copied from interface: DbServlet
This method is called when the servlet receives a URL POST/GET that it does not understand. You can generate/execute any custom URL commands by overriding this method.
Specified by:
handleCustomRequest in interface DbServlet

executeLogout

public void executeLogout(UserSession context,
                          javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse res)
                   throws java.lang.Exception
Description copied from interface: DbServlet
This is called when the user logs out of the database session.
Specified by:
executeLogout in interface DbServlet

executeCommitChanges

public void executeCommitChanges(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Description copied from interface: DbServlet
This method is called when the user applies any changes.
Specified by:
executeCommitChanges in interface DbServlet

executeRollbackChanges

public void executeRollbackChanges(UserSession context,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception
Description copied from interface: DbServlet
This is called when the user cancels any changes.
Specified by:
executeRollbackChanges in interface DbServlet

getEditFormField

public oracle.jdeveloper.servlet.FormFieldDef getEditFormField(javax.servlet.http.HttpServletRequest req,
                                                               java.lang.String sTable,
                                                               java.lang.String sColName,
                                                               java.lang.String sValue)

getViewFormField

public oracle.jdeveloper.servlet.FormFieldDef getViewFormField(javax.servlet.http.HttpServletRequest req,
                                                               java.lang.String sTable,
                                                               java.lang.String sColName,
                                                               java.lang.String sValue)

useTextArea

public void useTextArea(java.lang.String sName,
                        java.lang.String sPrompt,
                        java.lang.String sWidth,
                        java.lang.String sHeight,
                        java.lang.String sClass,
                        java.lang.String sMaxLength)
Description copied from interface: DbServlet
Use this method to specify the text area types for multi-line edit controls of the generated HTML form. sName is the name of the table and column, sPrompt is the label name to be displayed for the text area, sWidth is the width in characters for the text area, sHeight is the height of the text area, sClass is the Cascading Style Sheet (CSS) class name for the field, and sMaxLength is the maximum allowed character length for the input string. For example: useTextArea("DEPT.DEPTNO","Deptno","12","20","clsDEPTNO", "2");
Specified by:
useTextArea in interface DbServlet

useTextField

public void useTextField(java.lang.String sName,
                         java.lang.String sPrompt,
                         java.lang.String sWidth,
                         java.lang.String sClass,
                         java.lang.String sMaxLength)
Description copied from interface: DbServlet
Use this method to specify the text field types for single-line edit controls of the generated HTML form. sname is the name of the table and column, sPrompt is the label name to be displayed for the field, sWidth is the width in characters for the field, sClass is the Cascading Style Sheet (CSS) class name for the field, and sMaxLength is the maximum allowed character length for the input string. For example: useTextField("DEPT.DEPTNO","Deptno","12","clsDEPTNO", "2");
Specified by:
useTextField in interface DbServlet

useHiddenField

public void useHiddenField(java.lang.String sName)
Description copied from interface: DbServlet
Use this method to specify the hidden field type of the generated HTML form. sName is the name of the table and column of the hidden field. For example: useHiddenField("DEPT.DEPTNAME");
Specified by:
useHiddenField in interface DbServlet

useSelectField

public void useSelectField(java.lang.String sName,
                           java.lang.String sPrompt,
                           java.lang.String sClass,
                           java.lang.String[] sValues)
Description copied from interface: DbServlet
Use this method to specify the field types for combo box controls of the generated HTML form. sName is the name of the table and column, sPrompt is the label name to be displayed for the combo box, sClass is the Cascading Style Sheet (CSS) class name for the combo box, and ValuesList is the array of values for the combo box list. For example: String [] ValueList = "10, 20, 30, 40"; useSelectField("DEPT.DEPTNO","Deptno","clsDEPTNO",ValueList[]);
Specified by:
useSelectField in interface DbServlet

useMimeType

public void useMimeType(java.lang.String sName,
                        java.lang.String sPrompt,
                        java.lang.String sMimeType,
                        boolean bShowInline)
Description copied from interface: DbServlet
Use this hint to configure a database field to be displayed by the browser using the given MIME type. All columns using this call will be treated as read-only. sName is the name of the MIME file, sPrompt is the label name to be displayed for the text area, sMimeType is the type of the MIME file, and bShowInline generates an IMG tag for invoking an image if set to true, and an HREF tag if set to false. For example: useMimeType("MyGIF","Image","image/gif", true);
Specified by:
useMimeType in interface DbServlet

Business Components