PrimeFaces DataTable and server side pagination, filtering and sorting

Recently I’ve tried PrimeFaces 4x DataTable once again (after year or so working with Apache Wicket). One thing — I like it. It is now possible to implement scallable server side pagination, filtering and sorting logic without too much hacks

Read the rest of this entry »

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.

Read the rest of this entry »


Now when SyslogSessionMapper has been implemented, it time to finish SyslogMessageMapper. But before let’s remind us syslog use-case .

One thing that we will have to implement is retrieving syslog messages using different conditions. Here is preliminary list of conditions:

  1. Get messages by category name(s)
  2. Get messages by type name(s)
  3. Get messages by sender name(s)
  4. Get messages by session(s)
  5. Get messages by time interval(s)

The list can be continued…

This is the best place to use Query Object pattern. For futher reading please refer to:

I’d like to take some time about base classes implementation, since we will use query object pattern in groupchat logger plugin. This plugin will store log of xmpp groupchat (conference) and we need to provide flexible OO mechanism for retrieving chat messages from log. So it would be nice to implement base classes for SyslogMessageMapper and reuse them later :)