Examples of Criteria


Examples of org.springframework.data.solr.core.query.Criteria

@NoRepositoryBean
public class SolrProductRepository extends SimpleSolrRepository<Product, String> implements ProductRepository {

  @Override
  public Page<Product> findByPopularity(Integer popularity) {
    Query query = new SimpleQuery(new Criteria(SolrSearchableFields.POPULARITY).is(popularity));
    return getSolrOperations().queryForPage(query, Product.class);
  }
View Full Code Here

Examples of org.spw.controller.Criteria

       
        return null;
    }

    public String buttonAddCriteria_action() {
        Criteria criteria = new Criteria();
        criteria.property = (String) volunteerPropertiesList.getSelected();
        criteria.operator = (String) dropDownOperator.getSelected();
        criteria.value = (String) textValue.getText();
        info("you have now " + list.addCriteria(criteria) +
                " criteria(s) applied");
View Full Code Here

Examples of org.talend.esb.sam.server.persistence.criterias.Criteria

    public String getWhereClause() {
        StringBuilder result = new StringBuilder();
        List<String> names = new ArrayList<String>(criterias.keySet());
        Collections.sort(names);
        for (String key : names) {
            Criteria criteria = criterias.get(key);
            if (result.length() > 0) {
                result.append(" AND ");
            }
            result.append('(').append(criteria.getFilterClause()).append(')');
        }
        return result.toString();
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria

        PlanNode limitNode = NodeEditor.findNodePreOrder(accessNode, NodeConstants.Types.TUPLE_LIMIT, NodeConstants.Types.SOURCE);
        if (limitNode != null && FrameUtil.isOrderedLimit(limitNode)) {
          return false;
        }
       
        Criteria crit = (Criteria) parentNode.getProperty(NodeConstants.Info.SELECT_CRITERIA);
       
        if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, modelID, metadata, capFinder, record) ) {
            return false;                       
        }
       
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria

        }
       
        dependentCriteriaElements = new HashMap<ElementSymbol, Set<Collection<GroupSymbol>>>();
       
        for (PlanNode critNode : dependentCritieraNodes) {
            Criteria crit = (Criteria)critNode.getProperty(NodeConstants.Info.SELECT_CRITERIA);
            if(!(crit instanceof CompareCriteria)) {
                continue;
            }
            CompareCriteria compCrit = (CompareCriteria) crit;               
            if(compCrit.getOperator() != CompareCriteria.EQ) {
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria

        GroupSymbol a = new GroupSymbol("a"); //$NON-NLS-1$
        GroupSymbol b = new GroupSymbol("b"); //$NON-NLS-1$
        ElementSymbol x = new ElementSymbol("a.x", true); //$NON-NLS-1$
        ElementSymbol y = new ElementSymbol("b.y", true); //$NON-NLS-1$
       
        Criteria criteria = new CompareCriteria(x, CompareCriteria.EQ, new Function("func", new Expression[] {y})); //$NON-NLS-1$
        JoinPredicate predicate = new JoinPredicate(new UnaryFromClause(a), new UnaryFromClause(b), JoinType.JOIN_INNER, Arrays.asList(new Object[] {criteria}));
        From from = new From(Arrays.asList(predicate));
        predicate.getLeftClause().setMakeNotDep(true);
        predicate.getRightClause().setMakeDep(true);
        Select select = new Select(Arrays.asList(new Object[] {x, y}));
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria

        Update update = new Update();    
        update.setGroup(new GroupSymbol("m.g")); //$NON-NLS-1$
        update.addChange(new ElementSymbol("a"), new Reference(0));
        Option option = new Option();
        option.setNoCache(true);
        Criteria crit = new CompareCriteria(new ElementSymbol("b"), CompareCriteria.EQ, new Reference(1)); //$NON-NLS-1$
        update.setCriteria(crit);
        TestParser.helpTest("UPDATE m.g SET a = ? WHERE b = ? OPTION NOCACHE"//$NON-NLS-1$
                 "UPDATE m.g SET a = ? WHERE b = ? OPTION NOCACHE"//$NON-NLS-1$
                 update);                    
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria

        Select select = new Select(symbols);      
       
        From from = new From();
        from.addGroup(new GroupSymbol("g")); //$NON-NLS-1$
       
        Criteria criteria = new CompareCriteria(new ElementSymbol("a2"), CompareCriteria.EQ,  //$NON-NLS-1$
            new Constant(new Integer(5)));
       
        Query query = new Query();
        query.setSelect(select);
        query.setFrom(from);
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria

        option.addDependentGroup("a"); //$NON-NLS-1$
        option.addNotDependentGroup("b"); //$NON-NLS-1$
       
        Select select = new Select(Arrays.asList(new Object[] {x, y}));
       
        Criteria criteria = new CompareCriteria(x, CompareCriteria.EQ, y);
        Query query = new Query(select, from, criteria, null, null, null, option);
        TestParser.helpTest("Select a.x, b.y From a, b WHERE a.x = b.y option makedep a makenotdep b"//$NON-NLS-1$
                 "SELECT a.x, b.y FROM a, b WHERE a.x = b.y OPTION MAKEDEP a MAKENOTDEP b"//$NON-NLS-1$
                 query);
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria

                                 Set<Criteria> combinedCriteria,
                                 boolean checkForGroupReduction,
                                 QueryMetadataInterface metadata) {
        int startGroups = GroupsUsedByElementsVisitor.getGroups(crit).size();
       
        Criteria tgtCrit = (Criteria) crit.clone();
       
        try {
            tgtCrit = FrameUtil.convertCriteria(tgtCrit, tgtMap, metadata, true);
        } catch (QueryPlannerException err) {
            LogManager.logDetail(LogConstants.CTX_QUERY_PLANNER, err, "Could not remap target criteria in RuleCopyCriteria"); //$NON-NLS-1$
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.