db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: [jira] Commented: (DERBY-1059) call to stored procedure with out params fails in embedded driver
Date Fri, 10 Mar 2006 09:33:58 GMT
"David Van Couvering (JIRA)" <derby-dev@db.apache.org> writes:

>     [ http://issues.apache.org/jira/browse/DERBY-1059?page=comments#action_12369740 ]

> David Van Couvering commented on DERBY-1059:
> --------------------------------------------
> It looks like you are using a delegation model rather than an inheritance model for your
solution.  Why not have a superclass for EmbedCallableStatement40 and PreparedStatement40
both inherit from a common superclass that has all these shared methods? 
> Sorry if I'm missing something.

Delegation usually is preferable to inheritance for code reuse, as it
provides better encapsulation. Item 14 in Effective Java.


View raw message