code: @Override
      public SelectQuery getQuery() {
          SelectQuery selectQuery = new SelectQuery();
          List<DbColumn> columns = dbTable.getColumns();
          if(!columns.isEmpty()) {
              selectQuery.addColumns(columns.toArray(new Column[columns.size()]));
          } else {
              selectQuery.addAllTableColumns(dbTable);
          }
          selectQuery.addFromTable(dbTable);
          if(sort != null) {
              selectQuery.addOrderings(sort);
          }
          applyFilters(selectQuery);
          query = selectQuery;
          return query;
      }
docs: {@inheritDoc}