List<Result> r = new ArrayList<Result>();
if (result == null) {
return r;
}
for (int i = 0; i < result.size(); i++) {
Result x = new Result();
x.setErrno(result.get(i).getErrno());
x.setErrno(result.get(i).getErrno());
if (result.get(i).getKeyType() != null) {
switch (result.get(i).getKeyType()) {
case BINDING_KEY:
x.setKeyType(KeyType.BINDING_KEY);
break;
case BUSINESS_KEY:
x.setKeyType(KeyType.BUSINESS_KEY);
break;
case SERVICE_KEY:
x.setKeyType(KeyType.SERVICE_KEY);
break;
case T_MODEL_KEY:
x.setKeyType(KeyType.T_MODEL_KEY);
break;
}
}
x.setErrInfo(new ErrInfo());
x.getErrInfo().setErrCode(result.get(i).getErrInfo().getErrCode());
x.getErrInfo().setValue(result.get(i).getErrInfo().getValue());
r.add(x);
}
return r;
}