insertion points for custom domain/business logic
Bill Schneider <[email protected]> Mon, 22 Nov 2004 13:41:52 -0500
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Organization | Vecna Technologies, Inc. |
| Message-ID | <[email protected]> |
Hello,
How does Middlegen allow for the insertion of custom domain logic or
business logic in generated classes when using the Hibernate plugin?
Taking the Middlegen sample application (airline reservations) as a
starting point: let's say I want the generated Flight object to have an
additional getter method:
public long getFlightDuration() {
return getArrivalUtc().getTime() - getDepartureUtc().getTime();
}
How do I do that? Normally I'd expect to do something like that with
XDoclet merge files, but I don't see exactly where that happens in the
process. Thanks in advance to anyone who can help me understand how
this might work.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehigh Rd., Suite B
College Park, MD 20740
[email protected]
t: 301-864-7253 x1140
f: 301-699-3180
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/