您的位置:首页 > 其它

将升级目标对象更新到最新的版本1

2010-03-04 14:01 465 查看
public static void updateLastedPromotable(PromotionNotice promotionNotice) throws WTException {
QueryResult qr = MaturityHelper.service.getPromotionTargets(promotionNotice, false);
WTHashSet newHashSet = new WTHashSet();
WTCollection collection = new WTHashSet();
try {while (qr.hasMoreElements()) {
PromotionTarget target = (PromotionTarget) qr.nextElement();
Promotable promotable = target.getPromotable();
if (promotable instanceof Iterated) {
if (promotable instanceof Workable
&& WorkInProgressHelper.isCheckedOut((Workable) promotable)) {
promotable = (Promotable) WorkInProgressHelper.service.checkin(
(Workable) promotable, "AutoCheckin");
newHashSet.add(promotable); target.setPromotable(promotable);collection.add(target);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: