ItemsBeanControlTest.jws Sample

This topic inludes the source code for the ItemsBeanControlTest.jws Sample.

Sample Location

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

BEA_HOME/weblogic81/samples/workshop/SamplesApp/EJBs_ClientApps/selectMethods/

Sample Source Code


001 package selectMethods;
002 
003 /**
004  */
005 public class ItemsBeanControlTest implements com.bea.jws.WebService
006 {
007     static final long serialVersionUID = 1L;
008 
009     /** @common:control */
010     public selectMethods.ItemsBeanControl itemsBeanControl;
011 
012     /** @common:operation
013      * @jws:conversation phase="start"
014      */
015     public void startTestDrive() {}
016 
017     /** @common:operation
018      * @jws:conversation phase="finish"
019      */
020     public void finishTestDrive() {}
021 
022     /** 
023      <font face="Geneva, Arial, Helvetica, sans-serif">
024      * The home method selectAll uses ejbSelectAll to return all the items known in the database.
025      * Each item is shown as: [itemNumber, itemName, price, quantityAvailable]
026      </font> 
027      
028      * @common:operation
029      * @jws:conversation phase="continue"
030      */
031     public java.lang.String selectAll()
032     return itemsBeanControl.selectAll()}
033 
034 
035     /** 
036      <font face="Geneva, Arial, Helvetica, sans-serif">
037      * The home method selectByPrimaryKey take an integer itemnumber, the primary key, and uses ejbSelectByPrimaryKey 
038      * to return the name of the item matching that value.
039      </font> 
040      
041      * @common:operation
042      * @jws:conversation phase="continue"
043      */
044     public java.lang.String selectByPrimaryKey(int itemnumber)
045     return itemsBeanControl.selectByPrimaryKey(itemnumber)}
046 
047     /** 
048      <font face="Geneva, Arial, Helvetica, sans-serif">
049      * The home method selectByUSManufacturer  uses ejbSelectByUSManufacturer 
050      * to return all the item names of the items whose manufacturer is located in the US, 
051      * querying the entity relation between items and manufacturers.
052      </font> 
053      
054      * @common:operation
055      * @jws:conversation phase="continue"
056      */
057     public java.lang.String selectByUSManufacturer()
058     return itemsBeanControl.selectByUSManufacturer()}
059 
060     /** 
061      <font face="Geneva, Arial, Helvetica, sans-serif">
062      * The home method selectByItemName uses ejbSelectByItemName 
063      * to return the names of all the items known in the database.
064      </font> 
065      
066      * @common:operation
067      * @jws:conversation phase="continue"
068      */
069     public java.lang.String selectItemNames()
070     return itemsBeanControl.selectItemNames()}
071 
072     /** 
073      <font face="Geneva, Arial, Helvetica, sans-serif">
074      * The home method selectByItemNameOrdered uses ejbSelectByItemNameOrdered 
075      * to return the names of all the items known in the database, 
076      * ordered by price in descending order (starting with the most expensive items)
077      * and quantity available in ascending order,
078      * using the WebLogic keyword ORDERBY.
079      </font> 
080      
081      * @common:operation
082      * @jws:conversation phase="continue"
083      */
084     public java.lang.String selectItemNamesOrdered()
085     return itemsBeanControl.selectItemNamesOrdered()}
086 
087     /** 
088      <font face="Geneva, Arial, Helvetica, sans-serif">
089      * The home method selectManufacturerPriceN uses ejbSelectManufacturerPriceN 
090      * to return the names of all manufacturers, the number of items offered
091      * offered by a manufacturer, and the average price of these items. These results are
092      * ordered by manufacturer name.
093      </font> 
094      
095      * @common:operation
096      * @jws:conversation phase="continue"
097      */
098     public java.lang.String selectManufacturerPriceN()
099     return itemsBeanControl.selectManufacturerPriceN()}
100 
101     /** 
102      <font face="Geneva, Arial, Helvetica, sans-serif">
103      * The home method selectNameByPrice take a double price and uses ejbSelectNameByPrice
104      * to return the names of all the more expensive items.
105      </font> 
106      
107      * @common:operation
108      * @jws:conversation phase="continue"
109      */
110     public java.lang.String selectNameByPrice(double arg0)
111     return itemsBeanControl.selectNameByPrice(arg0)}
112 
113     /** 
114      <font face="Geneva, Arial, Helvetica, sans-serif">
115      * The home method selectNameQuantity uses ejbSelectNameQuantity
116      * to return the names and quantity in stock of all known items.
117      </font> 
118      
119      * @common:operation
120      * @jws:conversation phase="continue"
121      */
122     public java.lang.String selectNameQuantity()
123     return itemsBeanControl.selectNameQuantity()}
124 
125 }