Bug 175177 - Allow extension of Entity Generation inside Dali framework
Summary: Allow extension of Entity Generation inside Dali framework
Status: NEW
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks: 282871
  Show dependency tree
 
Reported: 2007-02-22 15:02 EST by Tom Mutdosch CLA
Modified: 2011-10-06 12:22 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Mutdosch CLA 2007-02-22 15:02:04 EST
I would like to enhance or supplement the Entity Generation that happens in the Dali Entity Generation wizard.  

I would like to handle things like generating additional constructors in the entities, or to generate some default namedQueries, or specify a concurrency field.   

Perhaps I could somehow provide my own subclassed EntityGenerator via an extension point mechanism.  If there was some way that in the wizard the appropriate generator could be chosen (or I could set the default generator programatically) then I could easily provide a way to have the framework generate  what I want for all of my Entities.  This could be somewhat rough for 1.0, but it would be nice if there was at least some entry point that extenders could utilize.
Comment 1 Neil Hauge CLA 2007-05-09 22:46:19 EDT
Bug 186288 has been entered to address what can be done for M7 in this area.  We have run out of time to implement this particular item for now.
Comment 2 Neil Hauge CLA 2007-05-14 11:22:23 EDT
I believe that bug 186288 will address the functionality requested here for 1.0.  Let me know if I am wrong about this.
Comment 3 Neil Hauge CLA 2007-07-20 11:18:45 EDT
For post 1.0 functionality, it would be nice if the "generic" platform Entity Generation was extensible so it could be enhanced more easily.
Comment 4 Neil Hauge CLA 2008-02-29 12:07:05 EST
Hey Tom...Some time has passed here, and I was wondering what your thoughts were regarding Entity Gen extensibility, given that you have probably implemented something at this point and may have an idea about what works, what could be could done differently, etc.
Comment 5 Tom Mutdosch CLA 2008-03-06 10:14:21 EST
Hi Neil,

We ended up just using the default GenerateEntities action and then modifying the entities ourselves after the fact.  This is probably the most inefficient way to do things.  

After the entities are generated, we have a number of things that we wish to augment (based on some user input in our wizards, etc)  such as adding some default named queries, modifying the code to work in a JSF environment (replacing java.sql.Date types with java.util.Date w/ TEMPORAL annotations), etc.  So using a mix of the Dali models and JDT model we add our custom code.  

Regarding bug 186288, I believe that is more than I wish to do.  I am fine with using the default Entity Generation wizard, but if there was a way I could hook into it (maybe some post-operation) where I could add additional code before the entity class was committed to disk that might suit my particular scenario.
Comment 6 Neil Hauge CLA 2008-03-25 22:36:13 EDT
Retargeting due to the limited time left in the 2.0 release.  
Comment 7 Leonard Theivendra CLA 2009-05-31 11:06:55 EDT
Would like to request this for serious consideration in Dali 2.3.  There needs to be a way to hook into the existing entity generation framework (i.e. to further annotate beans based on the dbm model, etc).  Perhaps a conversion of the wizard and operations to the WTP data model wizard framework can be a starting point.
Comment 8 Leonard Theivendra CLA 2009-11-25 12:55:31 EST
Hi would like to bring this to the team's attention again. Is there any way we can get this feature into the WTP 3.2 Dali release? A way to get at the vital wizard config values like user chosen tables, package to be generated to, etc, is a requirement for an adopting product that launches this wizard. Being able to participate in pre/post operations and other facilities like that provided by the WTP data model wizard framework would be a nice to have.
Comment 9 Neil Hauge CLA 2009-11-25 16:54:37 EST
(In reply to comment #8)

One way to nearly guarantee that this feature is added is to contribute it. : )  That said, I think there is some interest from another contributor to add this extensibility in the Helios timeframe.  I'm not sure it's a done deal yet, but I think it's reasonable to at least put this on the proposed list for 3.0.
Comment 10 Neil Hauge CLA 2010-04-01 10:59:54 EDT
I've spoken with the possible Oracle contributor of this functionality and it appears that this won't be implemented for the Helios time frame.  Moving this to 3.0 for now.
Comment 11 Neil Hauge CLA 2011-07-01 16:25:38 EDT
Moving JPA specific bugs to new JPA component in bugzilla.