First page Back Continue Last page Graphic

# Using Data Objects

- ## // Create new query, retrieve product

- ## oql = db.getOQLQuery( ". . ." );

- ## oql.bind( groupId );

- ## enum = oql.execute();

- ##

- ## while ( enum.hasMoreElements() ) {

- ## prod = (Product) enum.nextElement();

- ## // Modify the object

- ## prod.markDown( 0.25 );

- ## prod.setOnSale( true );

- ## }

- ##

- ## db.commit();