I need an object instance to be able to inherit *or* override the values from its parent instance.

<example>

For example, let's say we have a ProductExtension class that extends a ProductGroup class.

      ProductGroup
           |
    ProductExtension

An instance of ProductExtension can inherit or override the values of its parent ProductGroup instance.

So, if we have an instance of ProductGroup named 'group'

ProductGroup group = new ProductGroup();
group.setPrice(15);

and an instance of ProductExtension named 'ext'

ProductExtension ext = new ProductExtension();
ext.setProductGroup(group);

and ext inherits its price from group, then

ext.getPrice();

returns 15

Or, if we override the price on ext

ext.setPrice(8);

then

ext.getPrice();

returns 8.

</example>

Does Torque support this?
Is there a pattern for this?

Eric


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to