Query Object Part I

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

Class Diagram


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: