Java Reference
In-Depth Information
A discussion of how the DriverManager class works is outside the scope of a discussion on
B RIDGE . The point here is that the variable s is a Statement object, capable of issuing SQL
queries that return result sets:
ResultSet r = s.executeQuery(
"select name, apogee from firework");
while(r.next())
{
String name = r.getString("name");
int apogee = r.getInt("apogee");
System.out.println(name + ", " + apogee);
}
CHALLENGE 6.1
Figure 6.1 shows a UML sequence diagram that illustrates the message flow in
a typical JDBC application. Fill in the missing type names and the missing message
name in this illustration.
Figure 6.1. This diagram shows most of the typical message flow in a JDBC
application.
Figure 6.1 is a sequence diagram . You can use a class diagram to show the relationship of
the application to the driver it applies. Figure 6.2 shows the general form of an abstraction and
its implementation in an application of the B RIDGE pattern. This figure brings out the
separation of an abstraction and its implementation. The effect of calling the operation()
method depends on which implementation of the Implementor interface is in place.
Search WWH ::




Custom Search