SortKey sortKey = null;
sortKeys = new SortKey[orderItems.size()];
Iterator<SortSpecification> orderItr = orderItems.iterator();
int i = 0;
while(orderItr.hasNext()) {
SortSpecification item = orderItr.next();
String itemName = getExpressionString(item.getExpression());
LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Adding sort key for item: " + itemName); //$NON-NLS-1$
if(item.getOrdering() == Ordering.ASC) {
LogManager.logTrace(LogConstants.CTX_CONNECTOR, "with ASC ordering."); //$NON-NLS-1$
sortKey = new SortKey(itemName, true, null);
} else if(item.getOrdering() == Ordering.DESC){
LogManager.logTrace(LogConstants.CTX_CONNECTOR, "with DESC ordering."); //$NON-NLS-1$
sortKey = new SortKey(itemName, false, null);
}
sortKeys[i] = sortKey;
i++;