InternalChangeQuery: Add byLegacyChangeIds method
Useful for plugins that want to batch look up changes. Change-Id: I5f03d65af0945a94adb1ab8e5c6a775744f89b93
This commit is contained in:
@@ -122,6 +122,15 @@ public class InternalChangeQuery {
|
||||
return query(new LegacyChangeIdPredicate(id));
|
||||
}
|
||||
|
||||
public List<ChangeData> byLegacyChangeIds(Collection<Change.Id> ids)
|
||||
throws OrmException {
|
||||
List<Predicate<ChangeData>> preds = new ArrayList<>(ids.size());
|
||||
for (Change.Id id : ids) {
|
||||
preds.add(new LegacyChangeIdPredicate(id));
|
||||
}
|
||||
return query(or(preds));
|
||||
}
|
||||
|
||||
public List<ChangeData> byBranchKey(Branch.NameKey branch, Change.Key key)
|
||||
throws OrmException {
|
||||
return query(and(
|
||||
|
||||
Reference in New Issue
Block a user