Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Development/DBWS/MetadataGenerationFromDDLMetaModel

< EclipseLink‎ | Development‎ | DBWS
Revision as of 09:26, 15 July 2013 by Unnamed Poltroon (Talk) (Issues)

Generating JAXB and JPA Metadata From DDL Parser Meta-model

The EclipseLink DBWS design time component (a.k.a. DBWSBuilder) generates OR and OX projects for use by the runtime component - these project instances are built using DDLParser generated meta-model objects. Since EclipseLink 2.5, DBWS generates and writes out JAXB and JPA metadata (DBWS Metadata Support) based on the OR/OX projects. When considering JAXB/JPA metadata generation consolidation among various components, it would make sense to have the ability to generate metadata directly from the DDLParser generated metamodel, then bootstrap DBWS builder, JPA-RS, etc. from this metadata. This would allow the DDLParser and metadata generation piece proposed here to be standalone components, available to whomever requires this generated metadata.

JPA Metadata Generation

The EclipseLink JPA meta-model will be utilized to generate the JPA metadata. The JPAMetadataGenerator class will be responsible for building an instance of org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings. The entity mapping writer class (org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappingsWriter) will then be used to marshal the generated metadata.

JAXB Metadata Generation

  • TBD

Open Issues

  • Default package name for generated Entities, Embeddables, etc. (i.e. anything not in a PL/SQL package)?
  • Query names - what would be the default name for a query generated from a stored procedure, custom SQL, etc.?
  • For non-Oracle databases, JDBCHelper returns meta-model objects that extend the DDLParser meta-model - should this functionality be taken into consideration here as well?

Back to the top