Start of Content Area

Background documentation Persistence Tools  Locate the document in its SAP Library structure

 

Use

Open SQL for Java provides you, the application developer, with a persistence framework, which helps you develop portable, high-performance database applications. This is also due to the fact that Open SQL for Java is closely integrated in the SAP Java infrastructure (including the Java Dictionary and Software logistics). All tables are defined, cross-platform in the central Java Dictionary. You can then access table data in Java applications using SQLJ, Java Database Connectivity (JDBC), or EJB Container Managed Persistence (CMP), without needing to take the particular features of each database into account.   

The SAP Java IDE provides tool support, both for creating tables and for accessing table data in Java sources.

The Java Dictionary Perspective provides an editor that enables you to define cross-platform database objects such as tables and indexes. The objects created in the Java Dictionary are written to the database using Open SQL for Java.

The SAP NetWeaver Developer Studio also offers a set of utilities for static SQL accesses using SQLJ. You can edit SQL statements directly in Java sources in a special Java editor, the SQLJ Editor. This editor automatically converts these SQL statements into the appropriate Java calls for database accesses when you save an SQLJ source. When doing so, it calls the SQLJ Translator automatically and launches the SQLJ Checker, to check SQL sequences against database metadata directly. The SQLJ Translator triggers the conversion of SQL statements into the appropriate Java calls. If an error occurs, the associated message is displayed in the Task View.

This process is summarized in a single graphic below:

 

This graphic is explained in the accompanying text

 

Features

Defining database objects

  • Generate the project framework for Java Dictionary projects
  • Create cross-platform database objects in the Java Dictionary.
  • Tables
  • Indexes
  • Create SDA archives
  • Deploy SDA archives from within the JD project.

Accessing database data using SQLJ

  • Edit SQLJ sources in the SQLJ Editor
  • Check SQLJ sources against database metadata using the SQLJ checker
    This also includes:
  • Displaying SQL syntax errors
  • Navigating to where the error occurs in the source text
  • Convert SQL sources to Java statements for database accesses using the SQL Translator.

 

Further Documentation

Java Persistence

 

 

End of Content Area