public String orderby(){
  if (order != null && order.size() > 0) {
    StringBuilder sb=new StringBuilder("order by ");
    for (int i=0; i < order.size(); i++) {
      Entity e=order.get(i);
      if (i > 0) {
        sb.append(",");
      }
      sb.append(e.name);
      if (X.toInt(e.value) < 0) {
        sb.append(" desc");
      }
    }
    return sb.toString();
  }
  return null;
}

public String orderby ( ) { if ( order != null && order . size ( ) > 0 ) { StringBuilder sb = new StringBuilder ( "order by " ) ; for ( int i = 0 ; i < order . size ( ) ; i ++ ) { Entity e = order . get ( i ) ; if ( i > 0 ) { sb . append ( "," ) ; } sb . append ( e . name ) ; if ( X . toInt ( e . value ) < 0 ) { sb . append ( " desc" ) ; } } return sb . toString ( ) ; } return null ; }
get the order by .
