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 org.apache.turbine.services.db.TurbineDB; 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 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.