|
Example 16 - Bid Primary Key Finder
|
private BidPK EMPejbFindByPrimaryKey(Connection dbConn, Statement dbStmt, BidPK pk)
throws ObjectNotFoundException, SQLException
{
String selSpec = "select ownerId, ownedId ";
selSpec += "from BidTbl where ";
selSpec += "ownerId=" + SQLForm( pk.fOwnerId ) + " AND ";
selSpec += "ownedId=" + SQLForm( pk.fOwnedId );
ResultSet rs = dbStmt.executeQuery( selSpec );
if ( !rs.next() ) throw new ObjectNotFoundException();
return pk;
}
|