会话Bean SIndustry中该方法的完整代码如下: ( industryHome 为相应的实体Bean的Home接口)
/**
* 返回所有一级行业集合
*/
public ArrayList findAllTopIndustry()
{
ArrayList array=new ArrayList() ;
try
{ if(industryHome==null)
industryHome=getIndustryHome();
Collection c=industryHome.findAllTopIndustry();
Iterator i=c.iterator();
while(i.hasNext())
{
Industry indus=(Industry)i.next(); //问题行
IndustryDSO dso=indus.getDetails();
array.add(dso);
}
return array;
}
catch(Exception e)
{
throw new EJBException("findAllTopIndustry"+e);
}
}
/**
* 返回所有一级行业集合
*/
public ArrayList findAllTopIndustry()
{
ArrayList array=new ArrayList() ;
try
{ if(industryHome==null)
industryHome=getIndustryHome();
Collection c=industryHome.findAllTopIndustry();
Iterator i=c.iterator();
while(i.hasNext())
{
Industry indus=(Industry)i.next(); //问题行
IndustryDSO dso=indus.getDetails();
array.add(dso);
}
return array;
}
catch(Exception e)
{
throw new EJBException("findAllTopIndustry"+e);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货