Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Enh 266912: JPA 2.0 Metamodel API - partial implementation snapshot

Everyone,
For community reference, here is a partial implementation of the new Metamodel API as part of the JPA 2.0 JSR-317 specification (Ch 5 and 6.6) - this version extends Doug's initial implementation framework and specification checkin for bug# 272748. It follows ongoing reviews by Gordon, Guy and Doug. This partial version may be added to trunk with a posted SVN rev# - however the latest partial patches are for review and code sharing so that the separate Criteria API work can begin to sync with what is done here so far. The final checkin including review and outstanding work items below should occur shortly after 25 May (I am out of the office in 2 days for 6 days from 14-22 May).

   http://bugs.eclipse.org/266912
   Based on rev# 4047

Design Doc page - currently being updated today to reflect the following patches and direction for the next review.
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api


EclipseLink jpa build patch (rev 4047) (23.32 KB, patch)
https://bugs.eclipse.org/bugs/attachment.cgi?id=135222&action=diff

Eclipselink jpa test patch (off of 4047) (104.34 KB, patch)
https://bugs.eclipse.org/bugs/attachment.cgi?id=135336&action=diff

Eclipselink JPA criteria.queryBuilder stub patch (off of 4047) (21.55 KB, patch)
https://bugs.eclipse.org/bugs/attachment.cgi?id=135338&action=diff

Eclipselink JPA metamodel (partial implementation) patch (off of 4047) (100.81 KB, patch)
https://bugs.eclipse.org/bugs/attachment.cgi?id=135339&action=diff



The implementation is semi functional with part of EntityTypeImpl and ManagedTypeImpl functioning. I am in the middle of finishing mappedSuperclass hierarchy work to enable ManagedTypeImpl superType functionality that all getDeclared*() functions require. Our current native model does not store the mappedSuperclass that defines an inherited mapping - we can either search up the hierarchy tree on metamodel construction and find the new mappedSuperclass pseudo-descriptor we have created or modify the native model with a backpointer to the owning (java) superclass - this 2nd method was suggested by Doug in april but I only just now (2 days ago) fully understand the use case because it is required for getDeclared*() functionality. I am also in the middle of switching over the internal map of mappedSuperclass objects to a set with equals/hashCode identity overrides.

   Pending work:
-----------------
>- remove all System.out runtime printouts and breakpoints
>- finish all javadocs
>- finish all mappings support for MappedSuperclass functionality - currently only BasicAccessor support is added -- TODO: verify all of OneToOneAccessor, ManyToOneAccessor, OneToManyAccessor, ManyToManyAccessor, EmbeddedAccessor
-- TODO: Optionally verify and support TransientAccessor, EmbeddedIdAccessor
-- No changes required yet to VariableOneToOneAccessor for abstract hierarchy support (not in spec)

>-(Part of MappedSuperclass implementation)
-- finish Set and equals()/hashCode() changes from last MappedSuperclass code review -- implement no-clone-copy of mapping changes in MappedSuperclass code in BasicAccessor -- finish ManagedType.superType assignment - keyed on mappedSuperclass implementation -- finish all getDeclared*() calls that require checks based on ManagedType.superType
-- finish rest of non-type and non-declared get*() calls
-- finish all get*Id
-- finish all get*Version
-- complete CORE embeddable support
-- complete TEST embeddable support (including table generation)
-- complete CORE ManyToMany support
-- complete TEST ManyToMany support (including table generation)

>- finish and expand exception handling
-- more extensive parameterized generics testing with variable types is required
-- All IllegalArgumentExceptions for wrong name or type
- verify all toString() code
- expand test suite to include near TCK-level function and exception testing

   thank you
   /michael




Back to the top