ManufacturerBeanControlTest.jws Sample

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

Sample Source Code


001 package finderMethods;
002 
003 /**
004  */
005 public class ManufacturerBeanControlTest implements com.bea.jws.WebService
006 {
007     static final long serialVersionUID = 1L;
008 
009     /** @common:control */
010     public finderMethods.ManufacturerBeanControl manufacturerBeanControl;
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      * findAll returns all the manufacturers stored in the EJB_manufacturer table. 
025      * Each manufacturer is shown as: [manufacturerID, manufacturerName, USManufacturer]
026      </font> 
027      
028      * @common:operation
029      * @jws:conversation phase="continue"
030      */
031     public java.lang.String findAll() throws Exception
032     return (manufacturerBeanControl.findAll()).toString()}
033 
034     /**      
035      <font face="Geneva, Arial, Helvetica, sans-serif">
036      * findAllManufacturers returns all the manufacturers that produce the items known
037      * in the database, querying the entity relation between items and manufacturers.
038      * Duplicate records indicate that manufacturers produce multiple items. 
039      * Each manufacturer is shown as: [manufacturerID, manufacturerName, USManufacturer]
040      </font> 
041      
042      * @common:operation
043      * @jws:conversation phase="continue"
044      */
045     public java.lang.String findAllManufacturers() throws Exception
046     return (manufacturerBeanControl.findAllManufacturers()).toString()}
047 
048     // The return type of this method was not supported in Web Service operations
049     /** 
050      <font face="Geneva, Arial, Helvetica, sans-serif">
051      * findByPrimaryKey take an int manufacturerID and returns the matching manufacturer.
052      * Each manufacturer is shown as: [manufacturerID, manufacturerName, USManufacturer]
053      </font> 
054      
055      * @common:operation
056      * @jws:conversation phase="continue"
057      */
058     public void findByPrimaryKey(java.lang.Integer manufacturerIDthrows Exception
059     manufacturerBeanControl.findByPrimaryKey(manufacturerID)}
060 
061     /** 
062      <font face="Geneva, Arial, Helvetica, sans-serif">
063      * findDistinctManufacturer returns all the unique manufacturers that produce the items known
064      * in the database, querying the entity relation between items and manufacturers.
065      * Duplicate records have been filtered out using the DISTINCT keyword. 
066      * Each manufacturer is shown as: [manufacturerID, manufacturerName, USManufacturer]
067      </font> 
068      
069      * @common:operation
070      * @jws:conversation phase="continue"
071      */
072     public java.lang.String findDistinctManufacturer() throws Exception
073     return (manufacturerBeanControl.findDistinctManufacturer()).toString()}
074 
075     /** 
076      <font face="Geneva, Arial, Helvetica, sans-serif">
077      * findManufacturerOfItem takes an itemname and returns the manufacturer of that
078      * item, using the MEMBER OF keyword.
079      * Each manufacturer is shown as: [manufacturerID, manufacturerName, USManufacturer]
080      </font> 
081      
082      * @common:operation
083      * @jws:conversation phase="continue"
084      */
085     public java.lang.String findManufacturerOfItem(String itemnamethrows Exception
086     return (manufacturerBeanControl.findManufacturerOfItem(itemname)).toString()}
087 
088     /** 
089      <font face="Geneva, Arial, Helvetica, sans-serif">
090      * findUSManufacturer returns all US manufacturers, using a literal value to test
091      * whether a manufacturer is located in the US or not.
092      * Each item is shown as: [manufacturerID, manufacturerName, USManufacturer]
093      </font> 
094      
095      * @common:operation
096      * @jws:conversation phase="continue"
097      */
098     public java.lang.String findUSManufacturer() throws Exception
099     return (manufacturerBeanControl.findUSManufacturer()).toString()}
100 
101     /** 
102      <font face="Geneva, Arial, Helvetica, sans-serif">
103      * findWithoutItems returns all manufacturers that do not have any known items
104      * using the IS EMPTY operator.
105      * Each manufacturer is shown as: [manufacturerID, manufacturerName, USManufacturer]
106      </font> 
107      
108      * @common:operation
109      * @jws:conversation phase="continue"
110      */
111     public java.lang.String findWithoutItems() throws Exception
112     return (manufacturerBeanControl.findWithoutItems()).toString()}
113 
114 }