Creating an EGL Service type

You can create an EGL Service type with a few keystrokes. In an important variation, you can invoke the data-access wizard, which automatically creates data-access service functions for each database table that you specify.

The steps are as follows:
  1. Right click a package and do the fastest process available:
    • Click New > Service; or
    • Click New > Other, expand EGL, and click Service.

    The New Service wizard is displayed.

  2. Specify the file name.
  3. If you are creating a service without basing it on database tables, do as follows:
    1. Click Basic and then Next. The New basic EGL Service page is displayed.
    2. If you want to specify an Interface type that the new Service type will implement, use the Browse mechanism to select the Interface type. The created Service type will include a function that matches every function prototype in the Interface type.
    3. If you want to create a deployment descriptor entry to cause deployment of the Service type as an EGL REST-RPC service, click the checkbox for Create as web (EGL REST-RPC service).
    4. To create the Service type, click Finish.
  4. Alternatively, if you are invoking the data-access wizard, do as follows:
    1. Click Service from a database and then Next. The Database tables page is displayed.
    2. Use the topmost dropdown menu to select an existing connection, or click Create new connection and work through the subsequent pages to create a connection that will provide access to the database at development time.
      Note: If you save connection detail that you then want to change, go to the Data Source Explorer view:
      1. To access the view in the Database Development perspective, click Window > Open Perspective > Other and, at the Open Perspective page, click Database Development. To add the view to your current perspective instead, click Window > Show > View > Other, expand Data Management, and click Data Source Explorer.
      2. To update the connection details, right click the connection; click Properties; make the required changes, particularly in the JDBC connection properties pane; and click OK.
    3. Select one or more tables. The output code provides access to each table individually and does not include logic for table joins.
    4. If you want to include a schema name wherever a table name is referenced, click Qualify table names with schema.
    5. If you want to create an EGL deployment descriptor entry that will be referenced by a binding variable in the code that is being created for you, click Create SQL database binding in the development deployment descriptor.
    6. Click Next. The Summary page is displayed, and you can review any of several files that are listed in the Preview file combo box.
    7. Click Finish.
See also the following topics: