Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/DBWS/MetadataGenerationFromDDLMetaModel"

(Issues)
(Open Issues)
Line 9: Line 9:
  
 
== Open Issues ==
 
== Open Issues ==
* Default package name for generated Entities, Embeddables, etc. (i.e. anything not in a PL/SQL package)?
+
* What should the default package name for generated Entities, Embeddables, etc. (i.e. anything not in a PL/SQL package) be? Ideally the user would be permitted to set this on the generator.  Note that DBWS will use the user-provided 'project name' value for the default package name.
* Query names - what would be the default name for a query generated from a stored procedure, custom SQL, etc.?
+
* Query names - what would be the default name for a query generated from a stored procedure, custom SQL, etc.? For DBWS, the query name is provided by the user via <code>ProcedureOperationModel</code> 'name'.
 
* 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?
 
* 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?

Revision as of 10:02, 15 July 2013

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

  • What should the default package name for generated Entities, Embeddables, etc. (i.e. anything not in a PL/SQL package) be? Ideally the user would be permitted to set this on the generator. Note that DBWS will use the user-provided 'project name' value for the default package name.
  • Query names - what would be the default name for a query generated from a stored procedure, custom SQL, etc.? For DBWS, the query name is provided by the user via ProcedureOperationModel 'name'.
  • 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