Discussion:
[Middlegen-user] insertion points for custom domain/business logic
Bill Schneider
2004-11-29 06:01:02 UTC
Permalink
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
***@vecna.com
t: 301-864-7253 x1140
f: 301-699-3180
Loading...