public QueryBuilder<T,ID> orderBy(String columnName,boolean ascending){
  FieldType fieldType=verifyColumnName(columnName);
  if (fieldType.isForeignCollection()) {
    throw new IllegalArgumentException("Can't orderBy foreign colletion field: " + columnName);
  }
  if (orderByList == null) {
    orderByList=new ArrayList<OrderBy>();
  }
  orderByList.add(new OrderBy(columnName,ascending));
  return this;
}

public QueryBuilder < T , ID > orderBy ( String columnName , boolean ascending ) { FieldType fieldType = verifyColumnName ( columnName ) ; if ( fieldType . isForeignCollection ( ) ) { throw new IllegalArgumentException ( "Can't orderBy foreign colletion field: " + columnName ) ; } if ( orderByList == null ) { orderByList = new ArrayList < OrderBy > ( ) ; } orderByList . add ( new OrderBy ( columnName , ascending ) ) ; return this ; }
add " order by " clause to the sql query statement . this can be called multiple times to add additional " order by " clauses . ones earlier are applied first .
