Creating a data bean

Create a data bean that extends the corresponding access bean and implements the appropriate data bean interface.

Procedure

  1. Right-click the package into which you will store the data bean and select New > Class.
  2. In the New Java Class wizard, the project and package name fields are already populated. In the Name field, enter a name for your new data bean. For example, to create a data bean that extends the UserResAccessBean, enter UserResDataBean.
  3. From the Modifiers list, select public.
  4. To specify the superclass, click Browse, then in the pattern field, enter the name of the corresponding access bean. For example, enter UserResAccessBean and click OK.
  5. To specify the interfaces that the data bean should implement, click Add. In the Interface window:
    1. In the Pattern field, enter com.ibm.commerce.beans.SmartDataBean then click Add.
    2. In the Pattern field, enter com.ibm.commerce.beans.InputDataBean then click Add.
    3. Click OK.
  6. Click Finish.