Show TOC Start of Content Area

Procedure documentation Developing the Persistence Entities  Locate the document in its SAP Library structure

Use

This tutorial shows you how to implement the data model of the Project Management and Employee Services application using persistent entities. It uses the Employee entity as an example. The source codes of all entities are available in the section Reference .

Using the Dali Object-relational (O/R) mapping tools integrated in the SAP NetWeaver Developer Studio, you can develop persistent entities that comply with the Java Pesistence API (JPA) standard.

Procedure

To create the Employee entity, you complete the following steps:

...

       1.      Creating the EDMProjectEJBDemo

Persistent entities are not developed in a specific project. As they are usually packaged in an Enterprise JavaBeans (EJB) module, they are therefore developed in an EJB 3.0 project.

       2.      Generating the Project Entities

In this step you select the tables that you want to generate persistent entities from. The tools do that automatically for you and generate the Plain Old Java Objects (POJOs) that are mapped to the respective database table.

       3.      Implementing the Employee Entity

In this step you define relationships between your entities to reflect the relations defined by the data model of the application.

       4.      Configuring the Persistence XML

When you rebuild the application a new logical name (data source alias) is necessary that is mapped to a real data source. Every application uses a separate (own) data source alias specified in the data-source-aliases.xml and persistence.xml.

...

 

End of Content Area