"David Van Couvering (JIRA)" <[email protected]> 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. -- dt
