catalog.view.builder
Class ProductBuilder

java.lang.Object
  extended bycatalog.view.builder.ProductBuilder

public class ProductBuilder
extends java.lang.Object

The builder class for ProductBean and Product.

The backing beans are used view objects in the presentation tier. The business objects are used in the business logic tier. This class is used to convert in between the backing beans and business objects.

Commons BeanUtils is used.

Author:
Derek Y. Shen
See Also:
Commons BeanUtils

Constructor Summary
ProductBuilder()
           
 
Method Summary
static Product createProduct(ProductBean productBean)
          Create a new Product based on the ProductBean
static ProductBean createProductBean(Product product)
          Create a new ProductBean based on the Product business object.
static void populateProductBean(ProductBean productBean, Product product)
          Populate the ProductBean based on the Product business object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductBuilder

public ProductBuilder()
Method Detail

populateProductBean

public static void populateProductBean(ProductBean productBean,
                                       Product product)
                                throws CatalogException
Populate the ProductBean based on the Product business object.

Parameters:
productBean - the product bean to be populated
product - the product business object
Throws:
CatalogException

createProductBean

public static ProductBean createProductBean(Product product)
                                     throws CatalogException
Create a new ProductBean based on the Product business object.

Parameters:
product - the product business object
Returns:
the new product bean
Throws:
CatalogException

createProduct

public static Product createProduct(ProductBean productBean)
                             throws CatalogException
Create a new Product based on the ProductBean

Parameters:
productBean - the product managed bean
Returns:
the new product business object
Throws:
CatalogException


Copyright (c) 2004 The JCatalog Project.