Let’s try to apply Query Object pattern to Syslog in order to allow client to retrieve syslog messages from database in natural, flexible way.
jxmpp-bot is designed to use various mapper classes that are responsible for insertion/updation/deletion of domain objects and their database representation. It would be nice to add executeQuery() method to AbstractMapper. But there will be only few of them who actually uses query object pattern.
So I’ve decided to introduce IQueryable interface, like in diagram below