Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] disabling and enabling a customizer

I would not recommend dynamically changing mappings.

Either handle the functionality in your application/data access layer, or
perhaps use Descriptor events.


Vamsee Lakamsani wrote:
> 
> I used Shaun's blog tip to filter an association using a customizer
> (thanks
> Shaun).
> http://onpersistence.blogspot.com/2008/01/customizing-eclipselink-jpaorm.html
> 
> As the next step I want to enable and disable this customizer
> programmatically. The use case is the following:
> 
>    - three entities: Schedule, ScheduleVersion and Event
>    - Schedule has many ScheduleVersion(s) and each ScheduleVersion has
> many
>    Event(s).
>    - When I query for a Schedule, I only want to see the latest version of
>    the Event list (filtering customizer works great here).
>    - When I delete a Schedule, sometimes I want to delete just the latest
>    version and sometimes all the versions (here I was thinking may be
> disable
>    the customizer and reload/delete the Schedule and re-enable the
> customizer
>    programmatically).
> 
> Is there another way?
> 
> thanks
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/disabling-and-enabling-a-customizer-tp24266692p24275467.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top