Items.jcx Sample

This topic inludes the source code for the Items.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


01 package tagSamples.netui_databinding.repeater.data; 
02 
03 import com.bea.control.*; 
04 import java.sql.SQLException;
05 import org.openuri.dbcontrol.xmlbean.ItemType; 
06 import org.openuri.dbcontrol.xmlbean.ItemsArrayDocument;
07 
08 /** 
09  * This database control returns XMLBean types based on the schema ItemsArray.xsd.
10  
11  * See the the Schemas folder for the schema file ItemsArray.xsd and 
12  * its associated XMLBean types.
13  
14  * @jc:connection data-source-jndi-name="cgSampleDataSource" 
15  */ 
16 public interface Items extends DatabaseControl, com.bea.control.ControlExtension
17 
18    
19     static final long serialVersionUID = 1L;
20 
21     /**
22      * @jc:sql statement="SELECT * FROM ITEMS"
23      */
24     ItemType[] getAllItems() throws SQLException;
25 
26     /**
27      * @jc:sql statement="SELECT * FROM ITEMS WHERE ITEMNUMBER = {itemNumber}"
28      */
29     ItemType getIndividualItem(int itemNumberthrows SQLException;        
30     
31 }