ManufacturerBean_S.ejb Sample
This topic inludes the source code for the ManufacturerBean_S.ejb Sample.
Sample Location
This sample is located in the following directory in your WebLogic Workshop installation:
BEA_HOME/weblogic81/samples/workshop/SamplesApp/EJBs/selectMethods/
Sample Source Code
01 package selectMethods;
02
03 import java.util.Collection;
04 import javax.ejb.CreateException;
05
06 import weblogic.ejb.GenericEntityBean;
07
08 /**
09 * @ejbgen:entity default-transaction="Supports"
10 * ejb-name = "ManufacturerBean_S"
11 * data-source-name = "cgSampleDataSource"
12 * table-name = "EJB_MANUFACTURER"
13 * prim-key-class = "java.lang.Integer"
14 *
15 * @ejbgen:jndi-name
16 * local = "ejb.ManufacturerBean_SHome"
17 *
18 * @ejbgen:file-generation local-class = "true" local-class-name = "ManufacturerBean_SLocal" local-home = "true" local-home-name = "ManufacturerBean_SHome" remote-class = "false" remote-class-name = "ManufacturerBean_SRemote" remote-home = "false" remote-home-name = "ManufacturerBean_SRemoteHome" value-class = "false" value-class-name = "ManufacturerBean_SValue" pk-class = "true"
19 * @ejbgen:relation role-name="ManufacturerBean_S-has-ItemsBean_Ss" cmr-field="items" target-ejb="ItemsBean_S" multiplicity="One" name="ItemsBean_S-ManufacturerBean_S"
20 */
21
22 public abstract class ManufacturerBean_S
23 extends GenericEntityBean
24 {
25
26 public java.lang.Integer ejbCreate(Integer manufacturerId)
27 throws CreateException
28 {
29 setManufacturerId(manufacturerId);
30
31 return null;
32 }
33
34 public void ejbPostCreate(Integer manufacturerId)
35 throws CreateException
36 {}
37
38
39 /**
40 * @ejbgen:cmp-field ordering-number="10" column = "MANUFACTURER_ID"
41 * primkey-field="true"
42 * @ejbgen:local-method
43 */
44 public abstract Integer getManufacturerId();
45 /**
46 * @ejbgen:local-method
47 */
48 public abstract void setManufacturerId(Integer val);
49
50 /**
51 * @ejbgen:cmp-field column = "MANUFACTURERNAME"
52 * @ejbgen:local-method
53 */
54 public abstract String getManufacturername();
55 /**
56 * @ejbgen:local-method
57 */
58 public abstract void setManufacturername(String val);
59
60 /**
61 * @ejbgen:cmp-field column = "US_MANUFACTURER"
62 * @ejbgen:local-method
63 */
64 public abstract int getUsManufacturer();
65 /**
66 * @ejbgen:local-method
67 */
68 public abstract void setUsManufacturer(int val);
69
70
71 /**
72 * @ejbgen:cmr-field
73 * @ejbgen:local-method
74 */
75 public abstract java.util.Collection getItems();
76
77 /**
78 * @ejbgen:local-method
79 */
80 public abstract void setItems(java.util.Collection arg);
81 }
|