RE: exclude PK attributes from ejbCreate signature
"Rod Macpherson" <[email protected]>
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
In our case we wanted to exclude everything from ejbCreate and pass in our own data model. We create the model using the middlegen <java> file producer. So if we have a table FOO we have a model Foo and an ejbCreate( Foo foo ) method in the EJB. Grab this script as a starting point: .../plugins/entitybean/src/middlegen/plugins/entitybean/entity-cmp-20.vm Now squirrel that away in some folder and reference it in your ant script: <cmp20 ... > <fileproducer id="entity-cmp-20" template="custom-scripts/my-entity-cmp-20.vm"/> <jboss/> <weblogic/> </cmp20> The result will be unchanged but now you can start editing my-entity-cmp-20.vm to suit your own needs such as controlling the generation of ejbCreate. All you have to do is follow velocity script rules and use whatever collections and objects middlgen dumped in the velocity context. In our case we actually add a bunch more but that requires source code changes, still pretty easy however. -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Monday, September 29, 2003 3:24 PM To: [email protected] Subject: [Middlegen-user] exclude PK attributes from ejbCreate signature Our developers are asking to exclude the PK columns from the ejbCreate method call signature. I noticed the FlightBean.java in the samples accomplished this. How can I configure middlegen to work like this? TIA, Don Shade ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ middlegen-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/middlegen-user ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf