Methods Summary |
---|
protected java.lang.String | doExecute()
//~ Methods ----------------------------------------------------------------
Session s = getHibernateSession( );
try
{
_product = ( Product ) s.load( Product.class, _productId );
/*
* Since product.item is lazy loaded,
* traverse the collection to load all the product to display
*/
Iterator it = _product.getItems( ).iterator( );
while ( it.hasNext( ) )
{
Item i = ( Item ) it.next( );
i.getDescription( );
}
return SUCCESS;
}
finally
{
s.close( );
}
|
public xpetstore.domain.Product | getProduct()
return _product;
|
public java.lang.String | getProductId()
return _productId;
|
public void | setProduct(xpetstore.domain.Product product)Sets the product.
_product = product;
|
public void | setProductId(java.lang.String productId)Sets the productId.
_productId = productId;
|