Logo Search packages:      
Sourcecode: zope-atcontenttypes version File versions

def zope-atcontenttypes-0.2-rc3::types::ATTopic::ATTopic::queryCatalog (   self,
  REQUEST = None,
  kw 
)

Invoke the catalog using our criteria to augment any passed
    in query before calling the catalog.

Definition at line 273 of file ATTopic.py.

00273                                               :
        """Invoke the catalog using our criteria to augment any passed
            in query before calling the catalog.
        """
        q = self.buildQuery()
        if q is None:
            # empty query - do not show anything
            return []
        kw.update(q)
        pcatalog = getToolByName(self, 'portal_catalog')
        limit = self.getLimitNumber()
        max_items = self.getItemCount()
        if limit and self.hasSortCriterion():
            # Sort limit helps Zope 2.6.1+ to do a faster query
            # sorting when sort is involved
            # See: http://zope.org/Members/Caseman/ZCatalog_for_2.6.1
            kw.setdefault('sort_limit', max_items)
        results = pcatalog.searchResults(REQUEST, **kw)
        if limit:
            return results[:max_items]
        return results

    security.declareProtected(ChangeTopics, 'addCriterion')
    def addCriterion(self, field, criterion_type):


Generated by  Doxygen 1.6.0   Back to index