Hi, You can use java.lang.reflect.Proxy (since jdk 1.3) to implement this. There are a few open source frameworks for this use case too. XORM, Voruta uses dynamic code generation for data access and it must be possible to find more frameworks on SF. ----- Original Message ----- From: "Gary" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 28, 2003 10:49 PM Subject: Dynamic Creation of Value Object
> Let's say I have the following: > > interface IOrder - an order interface > - getOrderID() > - setOrderID(String orderID) > > interface IBusinessObject - a business object plus > persistence interface > - insert() > - update() > - delete() > > class OrderBO implements IOrder, IBusinessObject > > What I would like to do is avoid having to code up a > new class for OrderVO (order value object) that > implements just IOrder, providing just getters and > setters (no persistence). > > Does someone have code that I could use to do this in > BCEL? Basically, create a class that implements > IOrder and populate it with the data from a > fully-formed OrderBO? > > Thanks, Gary > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
