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

Difference between revisions of "Dali Project/specs/3.0/2.0ElementCollection"

(Project overview)
(Element Collection)
Line 36: Line 36:
 
== Requirements / Functionality ==
 
== Requirements / Functionality ==
  
=== Caching ===
+
=== Element Collection with Basic Type ===
  
* [[Using_EclipseLink_JPA_Extensions_(ELUG)#Using_EclipseLink_JPA_Extensions_for_Entity_Caching|@Cache]] supported in Entity and MappedSuperclass classes.
+
* Target Class - defaults to type of the Collection if it is generic
* Cache Type options
+
* Fetch - defaults to Lazy
** Default (Weak with Soft subcache)
+
* Collection Table
** Weak with Soft Subcache  -> CacheType.SOFT_WEAK
+
** Name defaults to <Entity name>_<attribute name>
** Weak with Hard Subcache  -> CacheType.HARD_WEAK
+
'''Element Collection Basic Type Details'''
** Weak  -> CacheType.WEAK
+
** Soft  -> CacheType.SOFT
+
** Full  -> CacheType.FULL
+
** Cache  -> CacheType.CACHE - do we want to support this?? We didn't in the mapping workbench
+
** None  -> CacheType.NONE
+
* Coordination Type
+
** Default (Send Object Changes)
+
** Send Object Changes
+
** Invalidate Changed Objects
+
** Send New Objects with Changes
+
** None
+
* @ExistenceChecking supported in Entity and MappedSuperclass classes.
+
** Default (Check Database) - if the empty annotation is added, the default becomes Check Cache.  See the second screen shot below
+
** Check Cache  -> ExistenceType.CHECK_CACHE
+
** Check Cache then Database  -> ExistenceType.CHECK_DATABASE
+
** Assume Existence  -> ExistenceType.ASSUME_EXISTENCE
+
** Assume Non-Existence  -> ExistenceType.ASSUME_NON_EXISTENCE
+
* Shared Cache
+
** What should we label this instead?  Possible options are 'Cache in L2 Cache' or 'Maintain in L2 Cache'.  In the @Cache annotation it is just 'shared'.
+
** If set to false then the panel is disabled and all Cache settings are removed.  You will be left with @Cache(shared=false) in the java source.
+
*Expiry
+
** Should we follow the Mapping Workbench or more closely follow the new EclipseLink annotations?  The 'Time To Live Expiry' would add the expiry element to the Cache annotation.  The 'Daily Expiry' would add the expiryTimeOfDay element to the Cache annotation. Potentially the radio buttons could be 'No Expiry', 'Expiry', 'Time of Day Expiry'
+
  
'''Entity 'Caching' section'''
+
[[Image: Dali_Project/specs/3.0/ElementCollection/ElementCollectionBasicType.bmp]]
  
[[Image: EntityCaching.jpg]]
 
  
 +
'''Ordering Section'''
  
Existence Checking combo if the ExistenceChecking annotation or xml element exists, the default changes.
+
[[Image: Dali_Project/specs/3.0/ElementCollection/Ordering.bmp]]
 
+
[[Image: ExistenceChecking.jpg]]
+
 
+
 
+
'''For reference, 'Caching' tab from the MW'''
+
 
+
[[Image: MWCaching.jpg]]
+
 
+
 
+
'''For reference, 'Refreshing Cache Options' section from the MW'''
+
 
+
[[Image: MWCaching2.jpg]]
+
  
 
=== Optimistic Locking ===
 
=== Optimistic Locking ===

Revision as of 11:53, 14 December 2009

Functional Specification: Dali Support for JPA 2.0 Element Collection mapping

Feedback

bug 258490 - element collection support


Document History

Date Author Version Description & Notes
12-9-2009 Karen Butzke Draft

Project overview

This feature covers the element collection mapping in the JPA 2.0 spec as well as any EclipseLink extensions.

Goals:

  • Add Generic 2.0 support for Element Collection
  • Add EclipseLink 3.0 support for Element Collection with relevant extensions
  • Provide the appropriate defaults and validation for these settings

Concepts

Present any concepts relevant to the feature.

EclipseLink Element Collection Functional Spec

Requirements / Functionality

Element Collection with Basic Type

  • Target Class - defaults to type of the Collection if it is generic
  • Fetch - defaults to Lazy
  • Collection Table
    • Name defaults to <Entity name>_<attribute name>

Element Collection Basic Type Details

File:Dali Project/specs/3.0/ElementCollection/ElementCollectionBasicType.bmp


Ordering Section

File:Dali Project/specs/3.0/ElementCollection/Ordering.bmp

Optimistic Locking

  • @OptimisticLocking annotation supported in Entity and MappedSuperclass classes. Corresponding eclipselink-orm.xml element is optimistic-locking
  • Type Options
    • Default (Version Column)
    • All Columns -> OptimisticLockingType.ALL_COLUMNS
    • Changed Columns -> OptimisticLockingType.CHANGED_COLUMNS
    • Selected Columns -> OptimisticLockingType.SELECTED_COLUMNS
    • Version Column -> OptimisticLockingType.VERSION_COLUMN
  • Validation
    • Type is 'Selected Columns' but no columns are selected
    • Selected Columns must be mapped and must not be primary keys
    • If using Optimistic Locking with anything other than Version Column, the @Version annotation will be ignored (warning, not error, for this)
    • If 'cascade' is set and type is not 'Version Column', warning that it is not supported.
    • If type is 'Version Column' or @OptimisticLocking is specified without a type, there must be a mapping marked @Version.
  • If no @Version annotation exists the Default option will display 'Default (None)
  • If a Version annotation exists, the default option will display 'Default (Version Column)


EntityOptimisticLocking2.jpg


For Reference, Locking tab from MW

MWLocking.jpg

API

Issues

This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.

Issue # Owner Description / Notes Decision

Future Considerations

During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.

Back to the top