All pastes #965682 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-01 03:13 UTC
rendered paste body
        public void valueChanged(ListSelectionEvent e) {

            if (!e.getValueIsAdjusting()) {
                updateLog("Filter Event: " + filterName);
                // Loop through all the Filters defined in the XML file
                for (filter f : settings.filters.values()) {
                    // If the filter selection does not constrain against this particular filter
                    // do not query the database to update the filter
                    if (f.constrains.containsKey(filterName) == false) {
                        continue;
                    }

                    String sqlStatement = f.sqlBaseStatement + qBuilder.genWhereConstrains(f, getAllFilterSelection()) + qBuilder.genOrderBy(f);
                    updateLog("\tSQL " + f.title + ": " + sqlStatement);
                    updateFilter(f, sqlStatement);
                }

                String sqlStatement = settings.resultFilter.sqlBaseStatement + qBuilder.genWhereConstrains(settings.resultFilter, getAllFilterSelection()) + qBuilder.genOrderBy(settings.resultFields);
                updateLog("\tSQL results: " + sqlStatement);
//                execQuery("music", sqlStatement );
                updateResults(sqlStatement);
            }

        }
    }