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:
- Right click a package and do the fastest process available:
- Click ; or
- Click , expand EGL, and click Service.
The New Service wizard is displayed.
- Specify the file name.
- If you are creating a service without basing it on database tables,
do as follows:
- Click Basic and then Next. The New basic EGL Service
page is displayed.
- 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.
- 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).
- To create the Service type, click Finish.
- Alternatively, if you are invoking the data-access wizard, do
as follows:
- Click Service from a database and then Next. The
Database tables page is displayed.
- 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:
- To access the view in the Database Development perspective, click and, at the Open Perspective
page, click Database Development. To add the
view to your current perspective instead, click , expand Data Management, and
click Data Source Explorer.
- 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.
- Select one or more tables. The output code provides access to
each table individually and does not include logic for table joins.
- If you want to include a schema name wherever a table name is
referenced, click Qualify table names with schema.
- 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.
- Click Next. The Summary page is displayed, and you can
review any of several files that are listed in the Preview file combo
box.
- Click Finish.
See also the following topics: