Design Patterns Java™ Workbook

(Michael S) #1
Chapter 6. Bridge

Figure 6.2. A Bridge structure moves the abstract operations that an abstraction relies on
into a separate interface.

It can be challenging to see how the classes in a JDBC application align with the BRIDGE
structure that Figure 6.2 shows. The questions to answer are: Which classes are abstractions?
Which classes are "implementations"?


Consider the JDBCAdapter class that Sun Microsystems packages in the JDK as
a demonstration of how to display data from a database table. This class implements
the TableModel interface as shown in Figure 6.3.

Free download pdf