A result set filter is a custom Java class an experienced developer writes in order to specifically manipulate the rows or columns of data returned from a read operation for an MBO.
To write a filter, developers must have previous experience with Java programming — particularly with the reference implementations for javax.sql.RowSet, which is used to implement the filter interface and described in the JDBC RowSet Implementations Tutorial at http://java.sun.com/developer/onlineTraining/Database/jdbcrowsets.pdf.
When a read operation returns data that does not completely suit the business requirements for your MBO, you can write and add a filter to the MBO to customize the data into the form you need. Developers can write a filter to add, delete, or change columns as well as to add and delete rows.
You can chain multiple filters together. Multiple filters are processed in the order they are added, each applying an incremental change to the data. Consequently, Sybase recommends that you always preview the results, taking note that the MBO has a different set of attributes than it would have had directly from the read operation. You can map and use the altered attributes in the same way you would a regular attribute from an unfiltered read operation.
Suppose you have an MBO based on this query that returns customer information, and you do not want first name and last name divided between two columns (fname and lname) :
SELECT * FROM sampledb.customer
Instead, write a filter that replaces these columns with a single concatenated "commonName" column.
SELECT id, commonName=fname+' '+lname, address, city, state, zip, phone, company_name FROM customer