String[] arr = CommonUtil.toStringArray(order, ',');
CommonUtil.trimItems(arr);
String[] parts;
String col;
boolean isDesc;
Order _order;
//ColumnInfo ci;
for(int i=0;i<arr.length;i++) {
parts=CommonUtil.toStringArray(arr[i], " \t\n\b\r");
CommonUtil.trimItems(parts);
col=parts[0];
col=HibernateUtil.validateColumnName(metaData, col);
isDesc=false;
if(parts.length>1){
if(parts[1].equalsIgnoreCase("desc"))isDesc=true;
else if(!parts[1].equalsIgnoreCase("asc")){
throw ExceptionUtil.createException((ORMSession)null,null,"invalid order direction defintion ["+parts[1]+"]","valid values are [asc, desc]");
}
}
_order=isDesc?Order.desc(col):Order.asc(col);
if(ignoreCase)_order.ignoreCase();
criteria.addOrder(_order);
}
}