Some of the interesting features of the Visualforce page and Apex controller include:
Users can click on the column headers to toggle the direction of the search results by using a CommandLink component and passing the column name.
Perform the search against multiple fields including multi-select picklists using dynamic SOQL and preventing SOQL injection attacks.
CustomerSearch Visualforce Page
The Visualforce page has three sections: 1) a search form, 2) a results blockTable and 3) a debug panel displaying the SOQL that was executed.
The search results BlockTable is rerendered when the search is submitted to the controller so that the results display properly. Users can click on the column headers to reorder the results of the query. This uses a CommandLink to pass the sort field to the controller and toggle the sort direction.