The Category Class

Now that you have products to put in it, you can create your Category object (see Listing 9.11). Again, most of it will look very familiar.

Listing 9.11. The Category Class
 package com.bfg.product; import java.util.Vector; import java.util.Set; import java.util.HashMap; import java.util.Iterator; import java.text.NumberFormat; import java.text.SimpleDateFormat; import; import org.apache.turbine.util.db.pool.DBConnection; import org.apache.turbine.util.TurbineConfig; import com.bfg.exceptions.ProductActivityException; import java.sql.*; import java.util.ResourceBundle; import org.apache.turbine.util.Log; public class Category { private static ResourceBundle sql_bundle = ResourceBundle.getBundle("com.bfg.product.SQLQueries"); ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.