ItemsRowSetControl.jcx Sample

This topic inludes the source code for the ItemsRowSetControl.jcx Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_databinding/repeater/data/

Sample Source Code


001 // ------------------------------------------------------------------------------
002 //  Generated by WebLogic Workshop
003 // 
004 //  Created on: Wed Jul 30 13:36:21 PDT 2003
005 //  By: steveh
006 // -----------------------------------------------------------------------------
007 package tagSamples.netui_databinding.repeater.data;
008 import java.sql.SQLException;
009 import javax.sql.RowSet;
010 import com.bea.control.DatabaseControl;
011 import com.bea.control.DatabaseFilter;
012 import com.bea.control.ControlExtension;
013 
014 /**
015  * @jc:connection data-source-jndi-name="cgDataSource"
016  * @common:schema file="#rowset-schemas" inline="true"
017  * @common:define name="rowset-schemas" value::
018  *    <xsd:schema targetNamespace="java:///repeaterTag.data" xmlns="java:///repeaterTag.data" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wld="http://www.bea.com/2002/10/weblogicdata" elementFormDefault="qualified" attributeFormDefault="unqualified">
019  *     <xsd:element name="ITEMSRowSet" wld:DefaultNamespace="java:///repeaterTag.data" wld:RowSet="true" wld:WriteTable="WEBLOGIC.ITEMS">
020  *      <xsd:complexType>
021  *       <xsd:choice maxOccurs="unbounded">
022  *        <xsd:element name="ITEMSRow" wld:DatabaseProductName="PointBase">
023  *         <xsd:complexType>
024  *          <xsd:sequence>
025  *           <xsd:element name="ITEMNUMBER" type="xsd:int" wld:JDBCType="INTEGER" minOccurs="0" wld:AutoIncrement="true" wld:PrimaryKey="true" wld:ReadOnly="true" wld:TableName="WEBLOGIC.ITEMS">
026  *           </xsd:element>
027  *           <xsd:element name="ITEMNAME" type="xsd:string" wld:JDBCType="VARCHAR" minOccurs="0" wld:TableName="WEBLOGIC.ITEMS" nillable="true">
028  *           </xsd:element>
029  *           <xsd:element name="QUANTITYAVAILABLE" type="xsd:int" wld:JDBCType="INTEGER" minOccurs="0" wld:TableName="WEBLOGIC.ITEMS" nillable="true">
030  *           </xsd:element>
031  *           <xsd:element name="PRICE" type="xsd:double" wld:JDBCType="DOUBLE" minOccurs="0" wld:TableName="WEBLOGIC.ITEMS" nillable="true">
032  *           </xsd:element>
033  *          </xsd:sequence>
034  *          <xsd:anyAttribute namespace="http://www.bea.com/2002/10/weblogicdata" processContents="skip">
035  *          </xsd:anyAttribute>
036  *         </xsd:complexType>
037  *        </xsd:element>
038  *       </xsd:choice>
039  *      </xsd:complexType>
040  *     </xsd:element>
041  *    </xsd:schema>::
042  
043  */
044 public interface ItemsRowSetControl extends ControlExtension, DatabaseControl
045 {
046     /** Disable default Java serialization */
047     public final static long serialVersionUID = 1L;
048 
049     /**
050      * @jc:sql command-type="grid"
051      *   rowset-name="ITEMSRowSet"
052      *   max-rows="1000" 
053      *   statement::
054      *   SELECT ITEMNUMBER,ITEMNAME,QUANTITYAVAILABLE,PRICE FROM WEBLOGIC.ITEMS {sql: filter.getWhereClause ()} {sql: filter.getOrderByClause ()}
055      *   ::
056      */
057     public RowSet getAllItemsDatabaseFilter filter )
058         throws SQLException;
059 
060     /**
061      * @jc:sql command-type="detail"
062      *   rowset-name="ITEMSRowSet"
063      *   statement::
064      *   SELECT ITEMNUMBER,ITEMNAME,QUANTITYAVAILABLE,PRICE FROM WEBLOGIC.ITEMS WHERE ITEMNUMBER = {x}
065      *   ::
066      */
067     public RowSet detailsItemsInteger x )
068         throws SQLException;
069 
070     /**
071      * @jc:sql command-type="update"
072      *   rowset-name="ITEMSRowSet"
073      */
074     public RowSet updateItemsRowSet changedRs )
075         throws SQLException;
076 
077     /**
078      * @jc:sql command-type="delete"
079      *   rowset-name="ITEMSRowSet"
080      */
081     public void deleteItemsRowSet oldRs )
082         throws SQLException;
083 
084     /**
085      * @jc:sql command-type="templateRow"
086      *   rowset-name="ITEMSRowSet"
087      */
088     public RowSet detailsItemsTemplate()
089         throws SQLException;
090 
091     /**
092      * @jc:sql command-type="insert"
093      *   rowset-name="ITEMSRowSet"
094      */
095     public RowSet insertItemsRowSet changedRs )
096         throws SQLException;
097 
098     /**
099      * @jc:sql command-type="insertedRow"
100      *   rowset-name="ITEMSRowSet"
101      *   statement::
102      *   SELECT ITEMNUMBER,ITEMNAME,QUANTITYAVAILABLE,PRICE FROM WEBLOGIC.ITEMS WHERE ITEMNUMBER = ( Select Max ( ITEMNUMBER ) From WEBLOGIC.ITEMS)
103      *   ::
104      */
105     public RowSet getInserted()
106         throws SQLException;
107 
108 }