'Get a ColumnQuery that yields ModAction objects according to
specified criteria.'

@classmethod
def get_actions(cls, srs, mod=None, action=None, after=None, reverse=False, count=1000):

    if (after and isinstance(after, basestring)):
        after = cls._byID(UUID(after))
    elif (after and isinstance(after, UUID)):
        after = cls._byID(after)
    if (not isinstance(after, cls)):
        after = None
    srs = tup(srs)
    if ((not mod) and (not action)):
        rowkeys = [sr._id36 for sr in srs]
        q = ModActionBySR.query(rowkeys, after=after, reverse=reverse, count=count)
    elif mod:
        mods = tup(mod)
        key = ('%s_%s' if (not action) else ('%%s_%%s_%s' % action))
        rowkeys = itertools.product([sr._id36 for sr in srs], [mod._id36 for mod in mods])
        rowkeys = [(key % (sr, mod)) for (sr, mod) in rowkeys]
        view = (ModActionBySRActionMod if action else ModActionBySRMod)
        q = view.query(rowkeys, after=after, reverse=reverse, count=count)
    else:
        rowkeys = [('%s_%s' % (sr._id36, action)) for sr in srs]
        q = ModActionBySRAction.query(rowkeys, after=after, reverse=reverse, count=count)
    return q
