Object[] arr = new Object[lastQueue.size() - 1];
int idx = 0;
for (Long oid : lastQueue) {
if (oid != GTM.END_OF_QUEUE) {
String globalName = GlobalName.buildGlobalName(clasz, oid, constraint.field);
SortItem item = new SortItem(oid, fi.typeHandler.get(gtm.GET(globalName)));
arr[idx++] = item;
}
}
// Sort the array