Hi Srinivas,
I never implemented this but i have few links so shared that one.
Did you get a chance to understand ResultSetFilter and how it works, please check this document. It may help you with your original query
How to write a custom ResultSetFilter in SMP
Rgrds,
Jitendra