<p>Reveal part of where catalog clause e.g. "=12",
" in (12,14)".</p>
@param pTcat Catalog
@param pFilterCatalog Filter Catalog
@return part of where clause e.g. "=12", " in (12,14)"
@throws Exception an Exception
773574
public final String revealWhereCatalog(final TradingCatalog pTcat,
    final FilterItems<CatalogGs> pFilterCatalog) throws Exception {
    List<CatalogGs> subcgsAll = new ArrayList<CatalogGs>();
    subcgsAll.add(pTcat.getCatalog());
    if (pFilterCatalog != null && pFilterCatalog.getOperator() != null
      && pFilterCatalog.getItems().size() > 0) {
      for (CatalogGs cgs : pFilterCatalog.getItems()) {
        TradingCatalog tcat = findTradingCatalogById(this.catalogs,
          cgs.getItsId());
        subcgsAll.add(cgs);
        copySubcatalogsGs(tcat, subcgsAll);
      }
    } else {
      copySubcatalogsGs(pTcat, subcgsAll);
    }
    Set<CatalogGs> subcgs = new HashSet<CatalogGs>();
    for (CatalogGs cgs : subcgsAll) {
      if (!cgs.getHasSubcatalogs()) {
        subcgs.add(cgs);
      }
    }
    if (subcgs.size() > 1) {
      StringBuffer sb = new StringBuffer(" in ("
        + pTcat.getCatalog().getItsId());
      for (CatalogGs cgs : subcgs) {
        sb.append("," + cgs.getItsId());
      }
      sb.append(")");
      return sb.toString();
    } else {
      return "=" + subcgs.iterator().next().getItsId();
    }
  }
826138
public static tmtrafficpolicy[] get_filtered(nitro_service service, String filter) throws Exception{
		tmtrafficpolicy obj = new tmtrafficpolicy();
		options option = new options();
		option.set_filter(filter);
		tmtrafficpolicy[] response = (tmtrafficpolicy[]) obj.getfiltered(service, option);
		return response;
	}
720774
def where(self, predicate):
        
        if predicate is None:
            raise NullArgumentError("No predicate given for where clause")
        return Enumerable(itertools.ifilter(predicate, self))
892975
public function filterByPageTypeHandle($ptHandle)
    {
        $db = \Database::get();
        if (is_array($ptHandle)) {
            $this->query->andWhere(
                $this->query->expr()->in('ptHandle', array_map([$db, 'quote'], $ptHandle))
            );
        } else {
            $this->query->andWhere('pt.ptHandle = :ptHandle');
            $this->query->setParameter('ptHandle', $ptHandle);
        }
    }
1247839
def where(self, predicate):
        
        if predicate is None:
            raise NullArgumentError(u"No predicate given for where clause")
        return Enumerable3(filter(predicate, self))
35668
public function find(array $filter = [], array $orderBy = [], $limit = 0,
        $offset = 0, array $associate = []
    ) {
        try {

            $query = $this->query()
                ->select()
                ->associate($associate)
                ->setFilter($filter);

            foreach ($orderBy as $orderByRule) {
                $query->orderBy($orderByRule[0], $orderByRule[1]);
            }

            return $query->limit($limit)->offset($offset)->run($this->connection);
        } catch (Exception\QueryException $e) {
            throw new Exception\RepositoryException($e->getMessage());
        }
    }
506367
public final AbstractItem findFirstMatching(Filter filter) throws MessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "findFirstMatching", filter);

        AbstractItem item = _references().findFirstMatching(filter);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "findFirstMatching", item);
        return item;
    }
603743
public static <T, E extends Exception> List<T> filter(final T[] a, final int fromIndex, final int toIndex, final Try.Predicate<? super T, E> filter,
            final int max) throws E {
        checkFromToIndex(fromIndex, toIndex, len(a));
        N.checkArgNotNull(filter);

        if (N.isNullOrEmpty(a)) {
            return new ArrayList<>();
        }

        final List<T> result = new ArrayList<>(min(9, max, (toIndex - fromIndex)));

        for (int i = fromIndex, cnt = 0; i < toIndex && cnt < max; i++) {
            if (filter.test(a[i])) {
                result.add(a[i]);
                cnt++;
            }
        }

        return result;
    }
679878
public static Collection<Object> filterByJavaBeanPageProperty(ArrayList<Object> aList,
	String aPropertyName, int fromIndex, int toIndex)
	{

		logger.debug("In Organizer filtering: " + aPropertyName);
		try
		{
			if (aList == null)
				throw new IllegalArgumentException(
				"aCollection required in filterByJavaBeanProperty");

			ArrayList<Object> filteredList = new ArrayList<Object>(aList.size());

			Object bean = null;
			Object beanPropertyValue = null;
			for (Iterator<Object> i = aList.iterator(); i.hasNext();)
			{
				try
				{
					bean = i.next();
					beanPropertyValue = JavaBean.getProperty(bean,
					aPropertyName);
					int beanPropIntVal = Integer.parseInt(
					beanPropertyValue.toString());
					// logger.debug("Got propertyValue: " + beanPropertyValue +
					// " for propertyName: " + beanPropIntVal);
					if (
						(fromIndex <= beanPropIntVal)
						&& (beanPropIntVal <= toIndex))
						{
						filteredList.add(bean);
						// logger.debug("Organizer added bean");
					}
				}
				catch (Exception e)
				{
					logger.debug("error occured : " + e);
				}
			}
			filteredList.trimToSize();
			return filteredList;
		}
		catch (Exception e)
		{
			throw new SystemException(e);
		}
	}
555092
public List<?> getList(PMContext ctx, EntityFilter filter, ListSort sort, Integer from, Integer count) throws PMException {
        return getDataAccess().list(ctx, filter, null, sort, from, count);
    }
1335130
public static vpnglobal_vpntrafficpolicy_binding[] get_filtered(nitro_service service, String filter) throws Exception{
		vpnglobal_vpntrafficpolicy_binding obj = new vpnglobal_vpntrafficpolicy_binding();
		options option = new options();
		option.set_filter(filter);
		vpnglobal_vpntrafficpolicy_binding[] response = (vpnglobal_vpntrafficpolicy_binding[]) obj.getfiltered(service, option);
		return response;
	}
129240
private QueryBuilder getFilter(FilterClause clause, final EntityMetadata metadata)
    {
        String condition = clause.getCondition();
        Object value = condition.equals(Expression.IN) ? clause.getValue() : clause.getValue().get(0);
        String name = ((AbstractAttribute) ((MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                metadata.getPersistenceUnit())).entity(metadata.getEntityClazz()).getAttribute(clause.getProperty()))
                .getJPAColumnName();

        QueryBuilder filterBuilder = null;

        if (condition.equals(Expression.EQUAL))
        {
            filterBuilder = new TermQueryBuilder(name, value);
        }
        else if (condition.equals(Expression.GREATER_THAN))
        {
            filterBuilder = new RangeQueryBuilder(name).gt(value);
        }
        else if (condition.equals(Expression.LOWER_THAN))
        {
            filterBuilder = new RangeQueryBuilder(name).lt(value);
        }
        else if (condition.equals(Expression.GREATER_THAN_OR_EQUAL))
        {
            filterBuilder = new RangeQueryBuilder(name).gte(value);
        }
        else if (condition.equals(Expression.LOWER_THAN_OR_EQUAL))
        {
            filterBuilder = new RangeQueryBuilder(name).lte(value);
        }
        else if (condition.equals(Expression.DIFFERENT))
        {
            filterBuilder = new NotQueryBuilder(new TermQueryBuilder(name, value));
        }
        else if (condition.equals(Expression.IN))
        {
            filterBuilder = new TermsQueryBuilder(name, clause.getValue());
        }

        return filterBuilder;
    }
1128204
public ServerFilter where(Predicate<ServerMetadata> filter) {
        checkNotNull(filter, "Filter must be not a null");

        predicate = predicate.and(filter);

        return this;
    }
1293391
private List<CmsCategoryBean> getFilteredCategories(String filter) {

        List<CmsCategoryBean> result;
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(filter)) {
            result = new ArrayList<CmsCategoryBean>();
            for (CmsCategoryBean category : getCategoryList()) {
                if (category.matchesFilter(filter)) {
                    result.add(category);
                }
            }
        } else {
            result = getCategoryList();
        }
        return result;
    }
829253
private function _findInIndex($keywords, $filter=null, $sortBy=null, $limit=10)
    {
        $ret = array();
        $query = $this->client->createSelect();
        // create a filterquery
        if (!empty($keywords))
        {
            // if isbn
            if (preg_match('/^\d{10,13}$/', $keywords)) {
                $query->addFilterQuery(array(
                    'key' => 'fq1',
                    // 'tag' => array('populationLimit'),
                    'query' => 'ISBN:'.$keywords,
                ));
            } else {
                $query->addFilterQuery(array(
                    'key' => 'fq1',
                    // 'tag' => array('populationLimit'),
                    'query' => '"'.$keywords.'"'.'~0.5',
                ));
            }
        }
        if (!empty($filter))
        {
            if (!empty($filter['categoryNames']))
            {
                $query->addFilterQuery(array(
                    'key' => 'fq4',
                    // 'tag' => array('populationLimit'),
                    'query' => 'categories:'.implode(' ',$filter['categoryNames']),
                    ));
            }
            
            if(!empty($filter['min']) && !empty($filter['max'])) {
                $query->addFilterQuery(array(
                    'key'=> 'fq2',
                    'query' => 'min_investment: ['.($filter['min']*10000).' TO *]'
                ));
                $query->addFilterQuery(array(
                    'key'=> 'fq3',
                    'query' => 'max_investment: [* TO '.($filter['max']*10000).']'
                ));
            } elseif(!empty($filter['min']) && empty($filter['max'])) {
                $query->addFilterQuery(array(
                    'key'=> 'fq2',
                    'query' => 'min_investment: ['.($filter['min']*10000).' TO *]'
                ));
            } elseif(empty($filter['min']) && !empty($filter['max'])) {
                $query->addFilterQuery(array(
                    'key'=> 'fq3',
                    'query' => 'max_investment: [* TO '.($filter['max']*10000).']'
                ));
            }
        }
        $query->setRows($limit);
        //:['' TO *]
        //
        // *:* is equivalent to telling solr to return all docs
        $resultSet = $this->client->select($query);
        $index = 0;
        foreach ($resultSet as $result) {
            $klass = new \StdClass;
            $klass->id = $result->id;
            $klass->name = $result->name;
            $klass->description = $result->description;
            $klass->min_investment = $result->min_investment;
            $klass->max_investment = $result->max_investment;
            $klass->address = $result->address;
            $klass->tags = $this->_getTagsOrCategories($result->tags);
            $klass->categories = $this->_getTagsOrCategories($result->categories);
            $klass->url = $result->url;
            $klass->contact_name = $result->contact_name;
            $klass->contact_email = $result->contact_email;
            $klass->contact_phone = $result->contact_phone;
            if (isset($result->big_image_url)) {
                $klass->big_image_url = $this->base_url.\Config::get('core::core.defaults.image_base_url.item').$result->big_image_url;
            } else {
                $klass->big_image_url = $this->base_url.\Config::get('core::core.defaults.image_base_url.item').\Config::get('core::core.defaults.image.item');
            }
            if (isset($result->medium_image_url)) {
                $klass->medium_image_url = $this->base_url.\Config::get('core::core.defaults.image_base_url.item').$result->medium_image_url;
            } else {
                $klass->medium_image_url = $this->base_url.\Config::get('core::core.defaults.image_base_url.item').\Config::get('core::core.defaults.image.item');
            }
            if (isset($result->small_image_url)) {
                $klass->small_image_url = $this->base_url.\Config::get('core::core.defaults.image_base_url.item').$result->small_image_url;
            } else {
                $klass->small_image_url = $this->base_url.\Config::get('core::core.defaults.image_base_url.item').\Config::get('core::core.defaults.image.item');
            }
            $klass->company = $this->_getCompany($result->companyId, $result->companyName, $result->companyBigImageUrl, $result->companyMediumImageUrl, $result->companySmallImageUrl);
            $klass->territory = $this->_getTerritory($result->territoryId, $result->territoryName, $result->countryId, $result->countryName);
            $ret[$index++] = $klass;
        }

        return $this->_mapSearchResult($ret, $filter);
    }
945653
public function getListFilter()
    {
        if ($this->_aListFilter === null) {
            $this->_aListFilter = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("where");
        }

        return $this->_aListFilter;
    }
1068522
public final TreeModelFilter<SQLPPTriplesMap> filter() throws RecognitionException {
        TreeModelFilter<SQLPPTriplesMap> value = null;


        Token not=null;
        TreeModelFilter<SQLPPTriplesMap> type1 =null;

        String[] keyword2 =null;


        try {
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:52:3: ( ( (not= NOT )? ( type COLON )? keyword ) )
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:52:5: ( (not= NOT )? ( type COLON )? keyword )
            {
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:52:5: ( (not= NOT )? ( type COLON )? keyword )
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:52:6: (not= NOT )? ( type COLON )? keyword
            {
            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:52:9: (not= NOT )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==NOT) ) {
                alt2=1;
            }
            switch (alt2) {
                case 1 :
                    // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:52:9: not= NOT
                    {
                    not=(Token)match(input,NOT,FOLLOW_NOT_in_filter90); 

                    }
                    break;

            }


            // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:52:15: ( type COLON )?
            int alt3=2;
            int LA3_0 = input.LA(1);

            if ( ((LA3_0 >= FUNCT && LA3_0 <= ID)||LA3_0==PRED||LA3_0==SOURCE||(LA3_0 >= TARGET && LA3_0 <= TEXT)) ) {
                alt3=1;
            }
            switch (alt3) {
                case 1 :
                    // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:52:16: type COLON
                    {
                    pushFollow(FOLLOW_type_in_filter94);
                    type1=type();

                    state._fsp--;


                    match(input,COLON,FOLLOW_COLON_in_filter96); 

                    }
                    break;

            }


            pushFollow(FOLLOW_keyword_in_filter100);
            keyword2=keyword();

            state._fsp--;


            }



                  value = type1;
                  if (value == null) {
                    value = new MappingStringTreeModelFilter();
                  }
                  
                  // Register the keyword.
                  value.addStringFilter(keyword2);
                  
                  // Register the negation.
                  if (not != null) {
                    value.putNegation();
                  }
                

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return value;
    }