Tutorials > Program model

Next >

Tutorial: Adding a finder to an existing entity bean

Attention: This tutorial is currently under revision. The content might contain errors or inaccuracies. Subscribe to this page to be notified when an updated version is available.

In this tutorial, you add a finder to an existing entity bean. By default, the order status page displays a customer's orders sorted by order number. In this tutorial, we will add a finder to the Order entity bean to sort a customer's orders by the time the order was placed, then modify the store JSP page to use the new finder.

Learning objectives

Due to the fact that the tutorial customization approach modifies existing WebSphere Commerce code, a migration issue arises when a new version of WebSphere Commerce is released. If you wish to retain the changes you make when customizing an entity bean in this way, be aware of the code maintenance implications. For more information about the implications of extending entity beans, see Extending the WebSphere Commerce object model with entity beans .

Time required

Expect this tutorial to take about one hour to complete.

You can load the completed tutorial code instead of performing each step. After loading the completed tutorial code into the workspace, you can run the code as if you performed each step in the tutorial. However, in order to fully attain the learning objectives, it is recommended that you perform the tutorial step by step.

Skill level



This tutorial is intended for WebSphere Commerce store developers who are responsible for modifying existing entity beans.


Knowledge prerequisites

Before starting this tutorial you should have a basic understanding of:

Code prerequisites

If you completed other WebSphere Commerce programming tutorials, there is no harm in leaving the code in the workspace, as it will not conflict with this tutorial.

  1. Before starting this tutorial, have published a store based upon the consumer direct sample storewithin the development environment. Within this store, be able to complete a purchase (for example, browse the catalog, add items to the shopping cart, check out and see the order confirmation).

  2. In order to complete the deployment steps, the store must also exist on the target WebSphere Commerce Server.

  3. In the Enterprise Explorer view, ensure the Toggle Project Grouping button is selected as shown in the following screen capture:

    By selecting the Toggle Project Grouping button, you ensure that the view in WebSphere Commerce Developer matches the screen captures and instructions in this tutorial.

Lessons in this tutorial

Next >


Search Tips   |   Advanced Search