Tutorials > Program model > Add a finder to an existing entity bean
Generate deploy code and regenerate the OrderAccessBean
In this step, you generate deploy code and regenerate the OrderAccessBean so that the new finder method is added to the OrderAccessBean.
Procedure
- To generate deploy code:
- In the Enterprise Explorer view, navigate to Order-OrderCaptureData > Deployment Descriptor: Order-OrderCaptureData > Entity Beans > Order.
- Right-click on the Order bean and select Prepare for Deployment.
- To regenerate the OrderAccessBean:
- In the Enterprise Explorer view, navigate to Order-OrderCaptureData > Deployment Descriptor: Order-OrderCaptureData.
- Right-click on Deployment Descriptor: Order-OrderCaptureData and select Java EE > Access Beans > Regenerate Access Beans.
- In the Regenerate Access Beans window:
- Click Deselect All.
- Select OrderAccessBean.
- Click Finish.
- Examine the OrderAccessBean.java file to find the new findOrdersByTimePlaced method:
- In the Enterprise Explorer view, navigate to Order-OrderCaptureData > ejbModule > com.ibm.commerce.order.objects > OrderAccessBean.java.
- Double-click the OrderAccessBean.java file to view its source.
- In the outline view, find the findOrdersByTimePlaced(Long) method.