To create a Business Entity class from a selected database table:
-
Select an OpenEdge Data Object project and select New Business Entity from the context menu.
The Create a Business Entity class page of
New Business Entity wizard appears.
-
Specify values for the controls on the Create a Business Entity class
page. See Create a Business entity class page for detailed information about
each control.
-
Click Next.
The Select a schema file page appears.
-
The Resource name field displays the name specified in
the Business Entity name field. You can enter a different
name. This is an alias of Business Entity class name.
-
Select the operation as Read-only,
CRUD, or CRUD and Submit. The
ABL code is generated with the specified operations.
-
Select Write dataset before image, if you want the
before-image data written to the file.
Note: The Write dataset before image option is selected
by default if the CRUD and Submit option is selected.
The before-image data is required to perform the Submit operation.
-
Select the Select database table option button to select
a database connection and table.
-
In the Connection field, select the database
connection that you want to use to dynamically define the
temp-table.
-
In the Table field, select the database table
from selected database connection.
-
Select Expose as Data Object Service
to expose the defined Business Entity class as a Data Object resource.
Note: This generates default Data Object interface annotations to
define a Business Entity as a Data Object resource.
-
Specify a Uniform Resource Identifier (URI) to access the Data Object
resource in the Resource URI field. By
default, the resource name is displayed in the field with a prefix "/". You can
enter a different URI name.
-
Click Finish.
The wizard creates and opens the Business Entity class, which includes the
temp-table definition with the Data Object interface (described in the Data Service
Catalog) annotations defining the scheme attributes, in the ABL Editor.
The wizard also generates a Data Object resource from
the Business Entity class file. By default, the defined Business Entity class files are
listed under the AppServer node in your project directory. .
Note: When you add a Business Entity class file to a non-Data Object project
such as OpenEdge or AppServer project except ABL Web App project, the Data Object
facet gets enabled for the project. The project behaves as a Data Object project
using which you can develop Data Object Services. The
Project Facets page (select on the project context menu) displays the facets associated with your
current project. For more information, see
Facet page.