Methods Summary |
---|
protected java.lang.String | doExecute()
//~ Methods ----------------------------------------------------------------
Session s = getHibernateSession( );
try
{
_category = ( Category ) s.load( Category.class, _categoryId );
/*
* Since category.product is lazy loaded,
* traverse the collection to load all the product to display
*/
Iterator it = _category.getProducts( ).iterator( );
while ( it.hasNext( ) )
{
Product p = ( Product ) it.next( );
p.getName( );
}
return SUCCESS;
}
finally
{
s.close( );
}
|
public xpetstore.domain.Category | getCategory()
return _category;
|
public java.lang.String | getCategoryId()
return _categoryId;
|
public void | setCategory(xpetstore.domain.Category category)Sets the category.
_category = category;
|
public void | setCategoryId(java.lang.String categoryId)Sets the categoryId.
_categoryId = categoryId;
|