com.laszlomarket
Class ProductForm

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended bycom.laszlomarket.ProductForm
All Implemented Interfaces:
java.io.Serializable

public class ProductForm
extends org.apache.struts.action.ActionForm

Stores information related to an Product within the Struts framework. Also provides validation on the Product.

Author:
Norman Klein
See Also:
Serialized Form

Field Summary
private  java.lang.Long id
           
private  java.lang.String image
           
private  java.lang.Double price
           
(package private)  java.util.List product
           
private  java.lang.Integer quantity
           
private  java.lang.String sku
           
private  java.lang.String title
           
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
ProductForm()
           
 
Method Summary
 void clear()
          clear() sets all the object's fields to null.
 java.lang.Long getId()
          getId() retrieves ID field.
 java.lang.String getImage()
          getImage() retrieves image field.
 java.lang.Double getPrice()
          getPrice() retrieves price field.
 java.util.List getProduct()
          getProduct() retrieves product field.
 java.lang.Integer getQuantity()
          getQuantity() retrieves quantity field.
 java.lang.String getSku()
          getSku() retrieves sku field.
 java.lang.String getTitle()
          getTitle() retrieves title field.
 void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Clears the object prior to each request.
 void setId(java.lang.Long id)
          setId() retrieves ID field.
 void setImage(java.lang.String image)
          Sets image field.
 void setPrice(java.lang.Double price)
          Sets price field.
 void setProduct(java.util.List product)
          Sets product field.
 void setQuantity(java.lang.Integer quantity)
          Sets quantity field.
 void setSku(java.lang.String sku)
          Sets sku field.
 void setTitle(java.lang.String title)
          Sets title field.
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          validate() ensures the user's product is valid and returns the appropriate ActionErrors object, if any errors are generated.
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private java.lang.Long id

title

private java.lang.String title

image

private java.lang.String image

sku

private java.lang.String sku

price

private java.lang.Double price

quantity

private java.lang.Integer quantity

product

java.util.List product
Constructor Detail

ProductForm

public ProductForm()
Method Detail

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                      javax.servlet.http.HttpServletRequest request)
validate() ensures the user's product is valid and returns the appropriate ActionErrors object, if any errors are generated.

Returns:
ActionErrors A collection of errors generated by validation process.

reset

public void reset(org.apache.struts.action.ActionMapping mapping,
                  javax.servlet.http.HttpServletRequest request)
Clears the object prior to each request.


getId

public java.lang.Long getId()
getId() retrieves ID field.


getTitle

public java.lang.String getTitle()
getTitle() retrieves title field.


getImage

public java.lang.String getImage()
getImage() retrieves image field.


getSku

public java.lang.String getSku()
getSku() retrieves sku field.


getQuantity

public java.lang.Integer getQuantity()
getQuantity() retrieves quantity field.


getPrice

public java.lang.Double getPrice()
getPrice() retrieves price field.


getProduct

public java.util.List getProduct()
getProduct() retrieves product field.


setId

public void setId(java.lang.Long id)
setId() retrieves ID field.


setTitle

public void setTitle(java.lang.String title)
Sets title field.


setImage

public void setImage(java.lang.String image)
Sets image field.


setSku

public void setSku(java.lang.String sku)
Sets sku field.


setPrice

public void setPrice(java.lang.Double price)
Sets price field.


setQuantity

public void setQuantity(java.lang.Integer quantity)
Sets quantity field.


setProduct

public void setProduct(java.util.List product)
Sets product field.


clear

public void clear()
clear() sets all the object's fields to null.



Copyright 2003