Running the Database Operation Value Object Wizard

You use the Database Operation Value Object Wizard to create value objects that are based on database tables or business views. The Database Operation Value Object Wizard guides you through a series of tasks to create value objects based on a database schema. You use the wizard to search for and find an existing table or business view. The table (business view) that you select should have all of the fields that are required for your new value object class. The wizard automatically selects all of the key fields in the table (business view). At the end of the process, the wizard generates code for the value object class and displays the code in the JDeveloper edit pane.

If you are creating a published business service, you run the wizard twice, once to create an input value object class and once to create an output value object class. If the published business service has more than one method, you run the wizard twice for each method. If you are creating a business service, you run the wizard once to create the internal value object, which has both input and output parameters. If the business service has more than one method, you run the wizard multiple times to create an internal value object for each method.

The wizard provides three ways for you to find an existing table (business view). On the wizard search page, you select either the Table or Business View option. You can use the Find button to return all tables or business views in JD Edwards EnterpriseOne, and then scroll through the results and select one. If you have some information about the table or business view that you want to use, you can enter information in one or more of the search fields to filter the search. You can use wildcards in the search fields. For example, if you know the object name has a 4 in it, you can use *4* in the Object Name field. Scroll through the results and select the appropriate table or business view. If you know the name of the table or business view, you can use the Advanced Search feature to find the table or business view.

The methodology guide provides rules and guidelines for creating published value objects and internal value objects for each type of database operation (Select, Insert, Update, and Delete). Naming conventions for the value object classes for both published business service and business service are discussed by database operation type.

To create a database value object:

  1. In the JDeveloper navigation pane, select the project.

  2. Right-click the project.

  3. From the context menu, click New.

  4. On the New Gallery window, open EnterpriseOne and select Classes, and then select Database Value Object Class.

  5. Click OK to launch the wizard that creates a value object class.

  6. On the Create EnterpriseOne Database Value Object Class, click Next.

  7. Enter credential information if required, and then click Next.

  8. On the wizard search page, select one of these object types:

    • Table

    • Business View

  9. Find a table (business view) by performing one of the following actions:

    • If you do not have any information about the table (business view), click Find to list all tables (business views) and scroll through the list. Select a table (business view).

    • If you have some information about the table (business view) that you want to use, complete one or more of these search fields to filter the search, and then click Find:

      – Object Name

      – System Code

      – Description

      – Reporting System Code

      You can use wildcards in any of these search fields.

      Select a table (business view) from the search results, and then click Next.

    • If you know which table (business view) you want to use, click Advanced Find.

      Using the drop-down list box, select the appropriate information for each of these fields, and then click Next:

      – Object Type

      – Object Name

  10. The next page of the wizard opens showing the attributes of the table (business view) that you selected.

  11. Select the parameters that you want to include in your new value object class, and then click Next.

    You can select parameters individually by selecting the Include check box in the same row as the parameter that you want. When you select parameters individually, you can display only the parameters that you selected by selecting the Display Select Only option. If you want to include all of the parameters in your value object, use the Select All button. Use the Clear All button to clear your selections and start over.

  12. On the EnterpriseOne Java Class page, enter the name of the value object that you are creating in the Value Object Name field.

  13. Select one of these Scope options:

    • Publish – if you are creating a value object class for a published business service.

    • Internal – if you are creating a value object class for an internal business service.

  14. Click Finish.

    If the name you entered for the value object already exists, the wizard sends you a warning message. If the name is a new name, the value object Java file appears in the JDeveloper editor under the project that you selected.

  15. JDeveloper displays the generated code in the edit pane.

  16. Use the visual aids and TODO tags to help you complete the generated code.

  17. To create accessors for the members in the value object Java file, right-click anywhere in the generated code.

  18. From the context menu, select generate accessors.

    The Generate Accessors dialog window appears.

  19. To select all members, click the top-level check box.

  20. Click OK.

  21. Save the value object Java file.

See "Database Exceptions" in the JD Edwards EnterpriseOne Tools Business Services Development Methodology Guide.