Create a data bean
Create a data bean that extends the corresponding access bean and implements the appropriate data bean interface.
- Right-click the package into which you will store the data bean and select New > Class.
- 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.
- From the Modifiers list, select public.
- 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.
- To specify the interfaces that the data bean should implement, click Add. In the Interface window:
- In the Pattern field, enter com.ibm.commerce.beans.SmartDataBean then click Add.
- In the Pattern field, enter com.ibm.commerce.beans.InputDataBean then click Add.
- Click OK.
- Click Finish.
Previous topic: Create the package for data bean code
Next topic: Add required fields to the data beanRelated tasks
Create a simple data bean