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

Everyone,
The following interim snapshot of the JPA 2.0 Metamodel API implementation has been checked in under rev# 4353, there will be several other snapshots over the next couple weeks as stubbed parts of the API are completed and the implementation is fine tuned.


https://bugs.eclipse.org/bugs/show_bug.cgi?id=266912
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=4353

See the following section for what this snapshot includes and what is pending...
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#Snapshot_Checkin_for_Rev_4350


Test Model, Suite
I will be checking in this test patch tomorrow.
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#Mapped_Superclass_Test_Model
\jpa\eclipselink.jpa.test\resource\eclipselink-metamodel-model
\jpa\eclipselink.jpa.test\src\org\eclipse\persistence\testing\tests\jpa\metamodel
\jpa\eclipselink.jpa.test\src\org\eclipse\persistence\testing\models\jpa\metamodel


JPA LRG results are unchanged from a clean 4350 build except for an intermittent failure on an existing testEMCloseAndOpen
Core LRG Tests run: 6706, Failures: 0, Errors: 14 - matches my clean view run
Code Reviewed
Ongoing by Gordon, this transaction's review is pending.


   Tested against an update on a clean view - to verify any missing commits

   Documentation
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#Metamodel_and_Criteria_packages_interfaces_API_-_Specification

   thank you
   /michael
   www.eclipselink.org

Michael O'Brien wrote:
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