Examples of Predicate


Examples of com.google.api.ads.adwords.axis.v201406.cm.Predicate

        }
      }
    }

    // Create predicate and selector.
    Predicate predicate = new Predicate();
    predicate.setField("Id");
    predicate.setOperator(PredicateOperator.IN);
    predicate.setValues(conversionIds.toArray(new String[0]));
    Selector selector = new Selector();
    selector.setFields(new String[] {"Id"});
    selector.setPredicates(new Predicate[] {predicate});

    // Get all conversion trackers.
View Full Code Here

Examples of com.google.api.ads.adwords.jaxws.v201309.cm.Predicate

   * @return the new set of Predicate objects with different instance for each of the Predicate
   */
  private Set<Predicate> copyPredicatesSet() {
    Set<Predicate> predicatesCopy = Sets.newLinkedHashSet();
    for (Predicate predicate : this.predicates) {
      Predicate copyPredicate = new Predicate();
      copyPredicate.setField(predicate.getField());
      copyPredicate.setOperator(predicate.getOperator());
      copyPredicate.getValues().addAll(predicate.getValues());
      predicatesCopy.add(copyPredicate);
    }
    return predicatesCopy;
  }
View Full Code Here

Examples of com.google.api.adwords.v201306.cm.Predicate

      Selector selector = new Selector();
      selector.setFields(new String[] {"Id", "AdGroupId", "Status"});
      selector.setOrdering(new OrderBy[] {new OrderBy("Id", SortOrder.ASCENDING)});

      // Create predicates.
      Predicate statusPredicate =
          new Predicate("Status", PredicateOperator.IN, new String[] {"ACTIVE"});
      Predicate adGroupIdPredicate =
          new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
      selector.setPredicates(new Predicate[] {statusPredicate, adGroupIdPredicate});

      // Get all active ad group criteria.
      AdGroupCriterionPage page = adGroupCriterionService.get(selector);
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.Predicate

      Selector selector = new Selector();
      selector.setFields(new String[] {"MediaId", "Name"});
      selector.setOrdering(new OrderBy[] {new OrderBy("MediaId", SortOrder.ASCENDING)});

      // Create predicates.
      Predicate typePredicate =
          new Predicate("Type", PredicateOperator.IN, new String[] {"VIDEO"});
      selector.setPredicates(new Predicate[] {typePredicate});

      // Get all videos.
      MediaPage page = mediaService.get(selector);
View Full Code Here

Examples of com.google.common.base.Predicate

            }
        } else {
            // filtering by group name included in query -> enforce offset
            // and limit on the result set.
            Iterator<Authorizable> result = findAuthorizables(statement.toString(), Long.MAX_VALUE, 0, null);
            Predicate groupFilter = new GroupPredicate(userManager,
                    groupId,
                    builder.isDeclaredMembersOnly());
            return ResultIterator.create(builder.getOffset(), builder.getMaxCount(),
                    Iterators.filter(result, groupFilter));
        }
View Full Code Here

Examples of com.google.gwt.query.client.Predicate

      if ("fixed".equals(gQueryUi.css("position", false))) {
        return GQuery.$(getViewportElement());
      }

      if (scrollParentPositionTest(gQueryUi)) {
        scrollParent = gQueryUi.parents().filter(new Predicate() {

          public boolean f(Element e, int index) {
            GQuery $e = GQuery.$(e);
            String position = $e.css("position", true);
            return ("relative".equals(position) || "absolute".equals(position) || "fixed"
                .equals(position))
                && isOverflowEnabled($e);
          }
        });

      } else {
        scrollParent = gQueryUi.parents().filter(new Predicate() {

          public boolean f(Element e, int index) {
            return isOverflowEnabled(GQuery.$(e));
          }
        });
View Full Code Here

Examples of com.hazelcast.query.Predicate

        Set<Integer> plist = new HashSet<Integer>(partitionCount);
        final ClientEndpoint endpoint = getEndpoint();
        QueryResultSet result = new QueryResultSet(null, iterationType, true);
        try {
            List<Future> flist = new ArrayList<Future>();
            final Predicate predicate = getPredicate();
            for (MemberImpl member : members) {
                Future future = createInvocationBuilder(SERVICE_NAME, new QueryOperation(name, predicate), member.getAddress()).invoke();
                flist.add(future);
            }
            for (Future future : flist) {
View Full Code Here

Examples of com.jayway.jsonpath.Predicate

        Map<String, Object> root = new HashMap<String, Object>();
        root.put("children", asList(rootChild_A, rootChild_B, rootChild_C));


        Predicate customFilter = new Predicate () {
            @Override
            public boolean apply(PredicateContext ctx) {
                if (ctx.configuration().jsonProvider().getMapValue(ctx.item(), "name").equals("rootGrandChild_A")) {
                    return true;
                }
View Full Code Here

Examples of com.linkedin.data.it.Predicate

  private static void testInputs(Object inputs[][], boolean isAvroUnionMode) throws IOException
  {
    for (Object[] row : inputs)
    {
      String schemaText = (String) row[0];
      Predicate predicate = (Predicate) row[1];
      String expected = (String) row[2];
      NamedDataSchema schema = dataSchemaFromString(schemaText, isAvroUnionMode);

      DataSchema filteredSchema = null;
      SchemaParser parser = new SchemaParser();
View Full Code Here

Examples of com.mobixess.jodb.query.api.Predicate

            Class syntheticPredicateSubjectClass = loader.loadClass(predicateSubjectClass.getName());
            SyntheticSubject syntheticSubject  = new SyntheticSubject(context, loader,syntheticPredicateSubjectClass);
           
            Class syntheticPredicateClass = loader.loadClass(predicate.getClass().getName());
            Predicate syntheticPredicate  = (Predicate) instantiateSyntheticPredicate(session, predicate, syntheticPredicateClass);// (Predicate)syntheticPredicateClass.newInstance();
           
            Comparator syntheticComparator = null;
            if(comparator!=null){
                Class syntheticComparatorClass = loader.loadClass(comparator.getClass().getName());
                syntheticComparator = (Comparator) instantiateSyntheticPredicate(session, comparator, syntheticComparatorClass);
                //(Comparator) session.getDescriptorForClass(syntheticComparatorClass).newInstance();
            }
           
            //int[] predicateSubjectFields = loader.getPredicateSubjectFields();
            JODBIndexingRootAgent indexingRootAgent = session.getIndexingRootAgent();
            JODBIndexingAgent indexingAgent = null;
            Iterator<Integer> predicateSubjectAccessedFields = loader.getAccessedPredicateSubjectFields();
            while (predicateSubjectAccessedFields.hasNext() && indexingAgent == null) {
                indexingAgent = indexingRootAgent.getIndexingAgent(predicateSubjectAccessedFields.next(), session.getBase());
            }
            ByteBuffer indexDataBuffer = null;
            int indexField = -1;
            IndexDataIterator indexIterator = null;
            if(indexingAgent!=null){
                indexField = indexingAgent.getFieldId();
                indexDataBuffer = ByteBuffer.allocate(16);
                indexIterator = indexingAgent.getIndexIterator(true);
            }
           
            if(indexIterator==null){
                indexIterator = new LArrayIndexIterator(base.getForAllObjects(ticket));
            }

            SyntheticSubject syntheticSubjectPrev = null;
            COMPARISON_STATE comparison_state= COMPARISON_STATE.UNKNOWN;
            LArrayChunkedBuffer acceptedIdsBuffer = new LArrayChunkedBuffer();
            while (indexIterator.hasNext()) {
                if(indexDataBuffer != null){
                    indexDataBuffer.clear();
                }
                long nextObjectId = indexIterator.next(indexDataBuffer);

                if(!syntheticSubject.setObjectData(nextObjectId, indexField, indexDataBuffer)){
                    continue;
                }

                if(!syntheticPredicate.match(syntheticSubject._syntheticSubject)){
                    continue;
                }
                acceptedIdsBuffer.add(nextObjectId);
                if(syntheticComparator!=null && comparison_state!=COMPARISON_STATE.MIXED){
                    if(syntheticSubjectPrev!=null ){
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.