class Filter {

    public void addOrderBy(Class<?> clazz, String field, boolean ascending) {
        if (field == null) {
            return;
        }
        Field f;
        Pair<Class<?>, Field> pair = ReflectUtil.getAnyField(clazz, field);
        assert (pair != null) : "Can't find field " + field + " in " + clazz.getName();
        clazz = pair.first();
        f = pair.second();

        Column column = f.getAnnotation(Column.class);
        String name = column != null ? column.name() : field;

        StringBuilder order = new StringBuilder();
        if (column == null || column.table() == null || column.table().length() == 0) {
            order.append(DbUtil.getTableName(clazz));
        } else {
            order.append(column.table());
        }
        order.append(".").append(name).append(ascending ? " ASC " : " DESC ");

        if (_orderBy == null) {
            _orderBy = order.insert(0, " ORDER BY ").toString();
        } else {
            _orderBy = order.insert(0, _orderBy + ", ").toString();
        }
    }

    public  Filter(Class<?> clazz, String field, boolean ascending, Long offset, Long limit);
    public  Filter(long limit);
    public  Filter(Filter that);

}