Package railo.runtime.type

Examples of railo.runtime.type.Query.sort()


    if(sort!=null && query!=null) {
      String[] arr=sort.toLowerCase().split(",");
      for(int i=arr.length-1;i>=0;i--) {
        try {
          String[] col=arr[i].trim().split("\\s+");
          if(col.length==1)query.sort(col[0].trim());
          else if(col.length==2) {
            String order=col[1].toLowerCase().trim();
            if(order.equals("asc"))
              query.sort(col[0],railo.runtime.type.Query.ORDER_ASC);
            else if(order.equals("desc"))
View Full Code Here


          String[] col=arr[i].trim().split("\\s+");
          if(col.length==1)query.sort(col[0].trim());
          else if(col.length==2) {
            String order=col[1].toLowerCase().trim();
            if(order.equals("asc"))
              query.sort(col[0],railo.runtime.type.Query.ORDER_ASC);
            else if(order.equals("desc"))
              query.sort(col[0],railo.runtime.type.Query.ORDER_DESC);
            else
              throw new ApplicationException("invalid order type ["+col[1]+"]");
          }
View Full Code Here

          else if(col.length==2) {
            String order=col[1].toLowerCase().trim();
            if(order.equals("asc"))
              query.sort(col[0],railo.runtime.type.Query.ORDER_ASC);
            else if(order.equals("desc"))
              query.sort(col[0],railo.runtime.type.Query.ORDER_DESC);
            else
              throw new ApplicationException("invalid order type ["+col[1]+"]");
          }
        }
        catch(Throwable t) {}
View Full Code Here

        if(sort!=null && sort.length>0) {
            int order = sortDirection==SORT_DIRECTION_ASC ? Query.ORDER_ASC : Query.ORDER_DESC;
            for(int i=sort.length-1;i>=0;i--) {
                String item=sort[i];
                if(item.indexOf(' ')!=-1)item=ListUtil.first(item," ",true);
                qry.sort(KeyImpl.getInstance(item),order);
                //keys[i] = new SortKey(item);
            }
        }   
        return qry;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.