Business Components

oracle.jdeveloper.servlet
Interface DbServlet

All Known Implementing Classes:
DbServletImpl

public interface DbServlet

A class representing the DbServlet Interface

Version:
PUBLIC

Field Summary
static int CLEAR_QUERY_CONDITIONS
           
static int EXECUTE_COMMIT_CHANGES
           
static int EXECUTE_DELETE_ROW
           
static int EXECUTE_EDIT_FORM
           
static int EXECUTE_INSERT_FORM
           
static int EXECUTE_LOGIN_FORM
           
static int EXECUTE_LOGOUT
           
static int EXECUTE_QUERY_FORM
           
static int EXECUTE_ROLLBACK_CHANGES
           
static int GENERATE_CUSTOM_FORM
           
static int GENERATE_EDIT_FORM
           
static int GENERATE_INSERT_FORM
           
static int GENERATE_LOGIN_FORM
           
static int GENERATE_QUERY_FORM
           
static int GENERATE_VIEW_FORM
           
static int GOTO_CURRENT_RECORD
           
static int GOTO_FIRST_RECORD
           
static int GOTO_LAST_RECORD
           
static int GOTO_NEXT_PAGE
           
static int GOTO_NEXT_RECORD
           
static int GOTO_PREV_PAGE
           
static int GOTO_PREV_RECORD
           
static int GOTO_RECORD_NUMBER
           
static int SAVE_QUERY_CONDITION
           
static int SHOW_LONG_ATTRIBUTE
           
 
Method Summary
 void CommitChanges(UserSession context)
          Commit changes.
 void connect(UserSession context, java.lang.String jdbcConnectString)
          Connect to the database.
 void disconnect(UserSession context)
          Disconnect from the database.
 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 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.
 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 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.
 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 initializeDbServlet()
          Initializes the servlet.
 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.
 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 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 sName)
          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 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.
 

Field Detail

GENERATE_LOGIN_FORM

public static final int GENERATE_LOGIN_FORM

EXECUTE_LOGIN_FORM

public static final int EXECUTE_LOGIN_FORM

GENERATE_QUERY_FORM

public static final int GENERATE_QUERY_FORM

EXECUTE_QUERY_FORM

public static final int EXECUTE_QUERY_FORM

GENERATE_EDIT_FORM

public static final int GENERATE_EDIT_FORM

EXECUTE_EDIT_FORM

public static final int EXECUTE_EDIT_FORM

GENERATE_INSERT_FORM

public static final int GENERATE_INSERT_FORM

EXECUTE_INSERT_FORM

public static final int EXECUTE_INSERT_FORM

GENERATE_VIEW_FORM

public static final int GENERATE_VIEW_FORM

GENERATE_CUSTOM_FORM

public static final int GENERATE_CUSTOM_FORM

EXECUTE_DELETE_ROW

public static final int EXECUTE_DELETE_ROW

EXECUTE_COMMIT_CHANGES

public static final int EXECUTE_COMMIT_CHANGES

EXECUTE_ROLLBACK_CHANGES

public static final int EXECUTE_ROLLBACK_CHANGES

EXECUTE_LOGOUT

public static final int EXECUTE_LOGOUT

SAVE_QUERY_CONDITION

public static final int SAVE_QUERY_CONDITION

CLEAR_QUERY_CONDITIONS

public static final int CLEAR_QUERY_CONDITIONS

GOTO_FIRST_RECORD

public static final int GOTO_FIRST_RECORD

GOTO_PREV_PAGE

public static final int GOTO_PREV_PAGE

GOTO_PREV_RECORD

public static final int GOTO_PREV_RECORD

GOTO_NEXT_RECORD

public static final int GOTO_NEXT_RECORD

GOTO_NEXT_PAGE

public static final int GOTO_NEXT_PAGE

GOTO_LAST_RECORD

public static final int GOTO_LAST_RECORD

GOTO_CURRENT_RECORD

public static final int GOTO_CURRENT_RECORD

GOTO_RECORD_NUMBER

public static final int GOTO_RECORD_NUMBER

SHOW_LONG_ATTRIBUTE

public static final int SHOW_LONG_ATTRIBUTE
Method Detail

initializeDbServlet

public void initializeDbServlet()
Initializes the servlet. This method is generated by the DBServlet Wizard, and is called by the DbServletImpl constructor.

setStyleSheet

public 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. The DbServlet framework defines the HTML structure and tags HTML items with CSS class names. Example: setStyleSheet("/dbservlet/css/aqua.css");

getStyleSheet

public java.lang.String getStyleSheet()
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

setImageDirectory

public void setImageDirectory(java.lang.String sDir)
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");

getImageDirectory

public java.lang.String getImageDirectory()
Gets the relative URL path to the servlet's images directory.

setAppName

public void setAppName(java.lang.String sAppName)
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");

getAppName

public java.lang.String getAppName()
Gets the file path to the database servlet's runtime deployment XML file.

setServletName

public void setServletName(java.lang.String sValue)
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");

getServletName

public java.lang.String getServletName()
Gets the servlet's name as registered with the web server.

setServletTitle

public void setServletTitle(java.lang.String sValue)
Sets the servlet title displayed by the Login Form. Example: setServletTitle("Master-Detail Database Servlet");

getServletTitle

public java.lang.String getServletTitle()
Gets the servlet title displayed by the Login Form.

setShowLoginDialog

public void setShowLoginDialog(boolean bShow)
Sets whether or not to display the Login Form when the servlet executes. Example: setShowLoginDialog(true);

getShowLoginDialog

public boolean getShowLoginDialog()
Returns true if the Login Form is displayed when the servlet executes, and false if it is not displayed.

setLinkName

public void setLinkName(java.lang.String sLinkName)
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");

getLinkName

public java.lang.String getLinkName()
Gets the association name (link) that the servlet uses to synchronize the master and detail result sets.

setMasterTableColumns

public void setMasterTableColumns(java.lang.StringBuffer sColumns)
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);

getMasterTableColumns

public java.lang.StringBuffer getMasterTableColumns()
Gets the SELECT column list used on the master table.

setMasterTableName

public void setMasterTableName(java.lang.String sName)
Sets the master table's name. Example: setMasterTableName("DEPT");

setMasterEntityName

public void setMasterEntityName(java.lang.String sName)
Sets the master table's entity name. DO NOT EDIT THIS METHOD. Example: setMasterEntityName("MyPackage.DEPT");

getMasterEntityName

public java.lang.String getMasterEntityName()
Gets the master table's entity name.

getMasterTableName

public java.lang.String getMasterTableName()
Gets the master table's name

setMasterTableWhereClause

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

getMasterTableWhereClause

public java.lang.StringBuffer getMasterTableWhereClause()
Gets the master table's WHERE clause entry.

setMasterTableOrderByClause

public void setMasterTableOrderByClause(java.lang.String sOrderBy)
Sets the master table's ORDER BY clause. Example: setMasterTableOrderByClause(new StringBuffer("DEPTNO ASC"));

getMasterTableOrderByClause

public java.lang.String getMasterTableOrderByClause()
Gets the master table's ORDER BY clause.

setDetailTableColumns

public void setDetailTableColumns(java.lang.StringBuffer sColumns)
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);

getDetailTableColumns

public java.lang.StringBuffer getDetailTableColumns()
Gets the SELECT column list used on the detail table.

setDetailTableName

public void setDetailTableName(java.lang.String sName)
Sets the detail table's name Example: setDetailTableName("EMP");

setDetailEntityName

public void setDetailEntityName(java.lang.String sName)
Sets the detail table's entity name. DO NOT EDIT THIS METHOD. Example: setDetailEntityName("MyPackage.EMP");

getDetailEntityName

public java.lang.String getDetailEntityName()
Gets the detail table's entity name.

getDetailTableName

public java.lang.String getDetailTableName()
Gets the detail table's name.

setDetailTableWhereClause

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

getDetailTableWhereClause

public java.lang.StringBuffer getDetailTableWhereClause()
Gets the detail table's WHERE clause entry.

setDetailTableOrderByClause

public void setDetailTableOrderByClause(java.lang.String sOrderBy)
Sets the detail table's ORDER BY clause. Example: setDetailTableOrderByClause(new StringBuffer("SAL DESC"));

getDetailTableOrderByClause

public java.lang.String getDetailTableOrderByClause()
Gets the detail table's ORDER BY clause.

setMasterDetail

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

isMasterDetail

public boolean isMasterDetail()
Returns true if the servlet is in master-detail mode, and false if single-table mode.

generateLoginPage

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

executeLoginPage

public void executeLoginPage(UserSession context,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.lang.Exception
Create a new session to the database using the provided username and password.

shouldReportException

public boolean shouldReportException(java.lang.Exception ex)
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.

reportException

public 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. Override this method to provide your own implementation.

generateQueryForm

public void generateQueryForm(UserSession context,
                              javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse res)
                       throws java.lang.Exception
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.

executeQueryForm

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

generateViewForm

public void generateViewForm(UserSession context,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.lang.Exception
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.

generateEditForm

public void generateEditForm(UserSession context,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws java.lang.Exception
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.

returnLongAttributeData

public void returnLongAttributeData(UserSession context,
                                    javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws java.lang.Exception
Returns the data for a long attribute column.

executeEditForm

public void executeEditForm(UserSession context,
                            javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)
                     throws java.lang.Exception
Executes a POSTed Edit Form. To validate row edits, override the saveRowEdits() method.

executeDeleteForm

public void executeDeleteForm(UserSession context,
                              javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse res)
                       throws java.lang.Exception
Executes a POSTed Delete form. To validate row edits, override the saveRowEdits() method.

executeInsertForm

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

saveRowEdits

public boolean saveRowEdits(UserSession context,
                            javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse res)

generateInsertForm

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

getMasterToolBar

public HTMLToolBar getMasterToolBar(UserSession context,
                                    javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws java.lang.Exception
Returns the toolbar to be displayed for the master table.

getDetailToolBar

public HTMLToolBar getDetailToolBar(UserSession context,
                                    javax.servlet.http.HttpServletRequest req,
                                    javax.servlet.http.HttpServletResponse res)
                             throws java.lang.Exception
Returns the toolbar to be displayed for the detail table.

getMasterViewForm

public HTMLDiv getMasterViewForm(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Returns the DIV that represents the master table's row view.

getMasterEditForm

public HTMLDiv getMasterEditForm(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Returns the DIV that represents the master table's row edit.

getMasterInsertForm

public HTMLDiv getMasterInsertForm(UserSession context,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception
Returns the DIV that represents the master table's new row.

getDetailInsertForm

public HTMLDiv getDetailInsertForm(UserSession context,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception
Returns the DIV that represents the detail table's new row.

getDetailViewForm

public HTMLDiv getDetailViewForm(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Returns the DIV that represents the detail table's row set view.

getDetailEditForm

public HTMLDiv getDetailEditForm(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
Returns the DIV that represents the detail table's row set edit view.

handleCustomRequest

public void handleCustomRequest(UserSession context,
                                javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res)
                         throws java.lang.Exception
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.

executeCommitChanges

public void executeCommitChanges(UserSession context,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws java.lang.Exception
This method is called when the user applies any changes.

executeLogout

public void executeLogout(UserSession context,
                          javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse res)
                   throws java.lang.Exception
This is called when the user logs out of the database session.

executeRollbackChanges

public void executeRollbackChanges(UserSession context,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception
This is called when the user cancels any changes.

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)
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");

useTextField

public 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. 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");

useHiddenField

public void useHiddenField(java.lang.String sName)
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");

useSelectField

public 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. 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[]);

useMimeType

public 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. 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);

getDbHostName

public java.lang.String getDbHostName()
Returns the database connection string.

setDbHostName

public void setDbHostName(java.lang.String sHost)
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");

getUserName

public java.lang.String getUserName()
Gets the user name.

setUserName

public void setUserName(java.lang.String sName)
Sets the user name.

getUserPassword

public java.lang.String getUserPassword()
Gets the user password.

setUserPassword

public void setUserPassword(java.lang.String sName)
Sets the user password.

getLockingMode

public int getLockingMode()
Gets the locking mode.

setLockingMode

public void setLockingMode(int mode)
Sets the locking mode.

setAutoCommit

public void setAutoCommit(boolean bSet)
Enables or disables automatic commit of changes.

getAutoCommit

public boolean getAutoCommit()
Returns true if automatic commit is enable, false otherwise.

setMasterTableKeyColumns

public 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. Note: To make a read-only VIEW-based HTML form, delete the ROWID value in this method and setDetailTableKeyColumns. For example: setMasterTableKeyColumns("DEPTNO");

setDetailTableKeyColumns

public 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. Note: To make a read-only VIEW-based HTML form, delete the ROWID value in this method and setMasterTableKeyColumns. For example: setDetailTableKeyColumns("DEPTNO");

CommitChanges

public void CommitChanges(UserSession context)
                   throws java.lang.Exception
Commit changes.

RollbackChanges

public void RollbackChanges(UserSession context)
                     throws java.lang.Exception
Rollback changes.

SyncChanges

public void SyncChanges(UserSession context)
                 throws java.lang.Exception
Synchronize changes. Any changes in the result sets are flushed to the server and server updates are retrieved.

connect

public void connect(UserSession context,
                    java.lang.String jdbcConnectString)
             throws java.lang.Exception
Connect to the database.

disconnect

public void disconnect(UserSession context)
Disconnect from the database.

Business Components