<html> <head> <title>Using Data Objects</title> </head> <body text=#FFFFFF bgcolor=#000080 link=#000080 vlink=#800000 alink=#000080> <center> <a href="text0.htm">First page</a> <a href="text21.htm">Back</a> <a href="text23.htm">Continue</a> <a href="text41.htm">Last page</a> <a href="img22.htm">Graphic</a></center><br> <h1><b>Using Data Objects</b></h1><p> <ul><li><h2><b><font color=#FF0000>// Create new query, retrieve product</b></font></h2> <li><h2><b>oql = db.getOQLQuery( ". . ." );</b></h2> <li><h2><b>oql.bind( groupId );</b></h2> <li><h2><b>enum = oql.execute();</b></h2> <li><h2><b></b></h2> <li><h2><b>while ( enum.hasMoreElements() ) {</b></h2> <li><h2><b> prod = (Product) enum.nextElement();</b></h2> <li><h2><b> <font color=#FF0000>// Modify the object</b></font></h2> <li><h2><b> prod.markDown( 0.25 );</b></h2> <li><h2><b> prod.setOnSale( true );</b></h2> <li><h2><b>}</b></h2> <li><h2><b></b></h2> <li><h2><b>db.commit();</b></h2> </ul></body> </html>