Seat Pricing

Clicking the Seat Pricing button returns a tabular display of current seat prices at the YMLD Theater (see Figure 11-8).

Figure 11-8. Current seat prices

The logic for retrieving the seat prices is identical to the logic for retrieving the current productions at the theater.

Statement s = conn.createStatement();
ResultSet rs = s.executeQuery( "SELECT * FROM PRICEPLAN");
while (rs.next()) {
  Object row = create("row");
  for (int  i = 1; i < 3; ++i) {
    Object cell = create("cell");
    setString(cell,"text",rs.getString(i));
    add(row,cell);
  }
  Object tablep = find(panel,"PriceTable");
  add(tablep,row);
}

In this routine, we are retrieving only ...

Get Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.