public
class BeanClass implements javax.ejb.SessionBean {
public
Collection ejbFindByPrimaryKey (String
key) throws FinderException{
PrimaryKey pKey = new
PrimaryKey(key);
Collection result;
searchByPrimaryKey(pKey);
if
(pKey.exists())
result = pKey;
return result;
else
throw
new ObjectNotFoundException("Primary Key "+ key +
" not found");
}
}
|
|