Code example for Order

Methods: toString

0
    private static String getSortingProperty(final Order order) {
        /** 
         * This method relies on the format that Order is using: 
         * propertyName + ' ' + (ascending?"asc":"desc") 
         */ 
        final String str = order.toString();
        return str.substring(0, str.indexOf(' '));
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java