5 Building the Data Model

This chapter contains the following topics:

5.1 Understanding the Data Model

The data model for developing a mobile enterprise application includes foundation classes that hold the data retrieved from AIS services. These classes are specific to the EnterpriseOne applications accessed by a mobile enterprise application. You can include the classes in the Application Controller or the View Controller.

You use the AIS Client Class Generator to generate classes for the Application Controller and View Controller.

5.2 Configuring the AIS Client Class Generator

The AIS Client Class Generator is available as a JDeveloper extension. Before you configure it, you must install the extension. See Chapter 3, "Getting Started" in this guide for instructions on how to install the extension.

To configure the AIS Client Class Generator:

  1. In JDeveloper, access Preferences:

    On Microsoft Windows, select the Tools menu, Preferences.

    On Mac, select the JDeveloper menu, Preferences.

  2. Select AIS Client Class Generator.

  3. On Preferences, complete the following fields to specify the AIS Server location and AIS Server information:

    • AIS Server URL. This is a fully qualified URL to the AIS Server. Make sure it ends with the port number of the AIS Server.

    • JAS Server URL. (Optional) Only enter a value if you want to override the value configured on the AIS Server.

    • Username. Enter a JD Edwards EnterpriseOne user name.

    • Password. Enter a JD Edwards EnterpriseOne user password.

    • Environment. (Optional) Enter a value only if you want to override the value configured on the AIS Server.

    • Role. This is optional. Enter a value only if you want to override the value configured on the AIS Server.

    • JSON Files Folder.

    • Default Java Classes Folder. The folder for storing generated Java files.

      The AIS Client Class Generator uses this folder only when it is run without a project open in JDeveloper. When a project is open in JDeveloper, the generator stores the Java files in the source directory for the project at the defined package path or the default package path which is com.oracle.e1.formservicetypes.

    • Java Package. The Java package name for the generated classes. The default is com.oracle.e1.formservicetypes.

  4. Click OK.

5.3 Generating Data Classes Based on a Form

Use the AIS Client Class Generator to generate data classes for an EnterpriseOne form. In the AIS Client Class Generator, you supply the service request information.

Note:

The AIS Client Class Generator supports form interconnects only; it does not support form events.

To use the AIS Client Class Generator to generate data classes:

  1. In JDeveloper, in the mobile application that you created, select the ApplicationController project.

    JDeveloper will save the classes generated by the AIS Client Class Generator in this location.

  2. Select the Tools menu, AIS Client Class Generator.

  3. On AIS Client Class Generator, complete the following fields to supply the service request information:

    • Username. This contains the default value entered in the preferences.

    • Password. This contains the default value entered in the preferences.

    • Environment. This contains the default value entered in the preferences.

    • Role. This contains the default value entered in the preferences.

    • Application Name. Enter the name of the EnterpriseOne application.

    • Form Name. Enter the name of the EnterpriseOne application form.

    • Version. (Optional) Enter the version name. If you leave it blank, the generator will use ZJDE0001 by default.

    • MaxPageSize. (Optional)

    • ReturnControlIDs. (Optional) Use this field to specify the exact fields on the form that you want generated. The return control IDs can specify hidden fields or a subset of fields.

    • FormInputs. (Optional)

    • FormServiceAction. Enter the action to be performed. Valid values include: Create, Read, Update, Delete.

    • FindOnEntry. (Optional)

    • DemoMode. (Optional, but recommended) This ensures at least one grid row is present, so grid classes are generated even if there is no data in the database.

  4. Make sure to select the Preview JSON Data and Keep JSON Files check boxes if you want to preview and keep the JSON files.

  5. Click the Generate button to generate the JSON, and then verify that it has the fields and records you need.

  6. Continue to generate the Java files. If successful, a confirmation message appears that shows the location of the JSON files.

  7. Highlight the Application Controller project and then click the "refresh" button to display the new files.

    The AIS Client Class Generator displays a dialog box that shows where the classes are saved.