¿¹Á¦

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");
}
//methods that must implement the interface
}

¼Ö·ç¼Ç
ejbFindByPrimaryKey()´Â 1Â÷ ۸¦ ¸®ÅÏÇØ¾ß ÇÕ´Ï´Ù. ´Ù¸¥ finder ¸Þ¼Òµå´Â ŰÀÇ ÄÝ·º¼ÇÀ» ¸®ÅÏÇØ¾ß ÇÕ´Ï´Ù.


public class BeanClass implements javax.ejb.SessionBean {
public String ejbFindByPrimaryKey (String key) throws FinderException{
PrimaryKey pKey = new PrimaryKey(key);
searchByPrimaryKey(pKey);
if (pKey.exists())
return key;
else
throw new ObjectNotFoundException("Primary Key "+ key + " not found");
}
//methods that must implement the interface
}