private static void setPurgeParams(DatabaseType dbType, PreparedStatement purgeStmt, String serviceId,
			String nodeId, int maxItems) throws SQLException
	{
        if ( dbType == DatabaseType.hsqldb )
        {
            purgeStmt.setString( 1, serviceId );
            purgeStmt.setString( 2, nodeId );
            purgeStmt.setString( 3, serviceId );
            purgeStmt.setString( 4, nodeId );
            purgeStmt.setInt( 5, maxItems );
        }
        else
        {
            purgeStmt.setString( 1, serviceId );
            purgeStmt.setString( 2, nodeId );
            purgeStmt.setInt( 3, maxItems );
            purgeStmt.setString( 4, serviceId );
            purgeStmt.setString( 5, nodeId );
        }
	}
Purges all items from the database that exceed the defined item count on
all nodes.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/DefaultPubSubPersistenceProvider.java