ADF中setCurrentRowWithKey和setCurrentRowWithKeyValue的区别

来源:互联网 发布:ipad 淘宝打不开 编辑:程序博客网 时间:2024/06/05 09:20
具体区别Google上提及的已经比较全面,以下记录自己在开发中对这两个方法的使用心得:
setCurrentRowWithKeyValue用于vo只有一个主键时
例如:userIt(Iterator)只有用户id作为主键时
userIt.setCurrentRowWithKeyValue(userId);

setCurrentRowWithKey用于vo具有多个主键时
例如:userIt(Iterator)有用户id和当前语言同时作为主键时
 Object[] key = new Object[2]; key[0] = userId; key[1] = currentLanguage; userIt.setCurrentRowWithKey(new Key(key).toStringFormat(true)); 


0 0
原创粉丝点击