Methods Summary |
---|
protected java.lang.String | doExecute()
//~ Methods ----------------------------------------------------------------
if ( ( _keyword == null ) || ( _keyword.length( ) == 0 ) )
{
return SUCCESS;
}
Session s = getHibernateSession( );
try
{
String oql = "FROM p IN CLASS " + Product.class + " WHERE" + " ( p.productId LIKE '%" + _keyword + "%' ) OR" + " ( p.name LIKE '%" + _keyword + "%' ) OR" + " ( p.description LIKE '%" + _keyword + "%' )";
_products = s.find( oql );
return SUCCESS;
}
finally
{
s.close( );
}
|
public java.lang.String | getKeyword()
return _keyword;
|
public java.util.Collection | getProducts()
return _products;
|
public void | setKeyword(java.lang.String keyword)Sets the keyword.
_keyword = keyword;
|
public void | setProducts(java.util.Collection products)Sets the products.
_products = products;
|