/**
* getCntrFromEdi
* @param ediFileBean
* @param iMainkey
* @param cntrno
* @return
*/
public Object getCntrFromEdi(EdiFileBean ediFileBean,int iMainkey,String cntrno){
try {
ArrayList cntrList = (ArrayList)ediFileBean.getCntrHt().get(iMainkey);
if(cntrList!=null && cntrList.size()>0){
for(int i = 0;i<cntrList.size();i++){
Object objCntr = cntrList.get(i);
Class clEdiBkcntr = objCntr.getClass();
Method method;
method = clEdiBkcntr.getMethod("getCntrno",null);
Object[] arg = new Object[0];
String cntrnoTmp = "";
cntrnoTmp = (String)method.invoke(objCntr, arg);
if(cntrno.equals(cntrnoTmp)){
return objCntr;
}
}
}
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}