try{
Class cl = Class.forName(beanPackageName);
List<String> methodNameLst = ComparatorTableFileReader.GetPrimaryMethodName(tableName);
for(int i=0;i<newObjLst.size();i++){
BeanExt newObj=(BeanExt)newObjLst.get(i);
for(int j=0;j<oldObjLst.size();j++){
BeanExt oldObj=(BeanExt)oldObjLst.get(j);
boolean flag=true;
for(String name:methodNameLst){
Method method1 = cl.getMethod(name);
Object resultOld = method1.invoke(oldObj.getObject());
Object resultNew=method1.invoke(newObj.getObject());
if((null==resultOld&&null!=resultNew)||(null!=resultOld&&null==resultNew)){
flag=false;
}
else if(null!=resultOld&&null!=resultNew&&!resultOld.toString().equals(resultNew.toString())){
flag=false;
}
}
if(flag){
equals(oldObj,newObj,cl);
continue;
}
// if(equals(oldObj,newObj,cl)){
// continue;
// }
}
}
}
catch (Exception e) {
e.printStackTrace();
}
Class cl = Class.forName(beanPackageName);
List<String> methodNameLst = ComparatorTableFileReader.GetPrimaryMethodName(tableName);
for(int i=0;i<newObjLst.size();i++){
BeanExt newObj=(BeanExt)newObjLst.get(i);
for(int j=0;j<oldObjLst.size();j++){
BeanExt oldObj=(BeanExt)oldObjLst.get(j);
boolean flag=true;
for(String name:methodNameLst){
Method method1 = cl.getMethod(name);
Object resultOld = method1.invoke(oldObj.getObject());
Object resultNew=method1.invoke(newObj.getObject());
if((null==resultOld&&null!=resultNew)||(null!=resultOld&&null==resultNew)){
flag=false;
}
else if(null!=resultOld&&null!=resultNew&&!resultOld.toString().equals(resultNew.toString())){
flag=false;
}
}
if(flag){
equals(oldObj,newObj,cl);
continue;
}
// if(equals(oldObj,newObj,cl)){
// continue;
// }
}
}
}
catch (Exception e) {
e.printStackTrace();
}