protected DBSort . SortBuilder getSortBuilder ( String order , String field ) { DBSort . SortBuilder sortBuilder ; if ( "desc" . equalsIgnoreCase ( order ) ) { sortBuilder = DBSort . desc ( field ) ; } else { sortBuilder = DBSort . asc ( field ) ; } return sortBuilder ; }
Returns a sort builder for the given order and field name .