Examples of Predicate


Examples of org.apache.derby.impl.sql.compile.Predicate

      ft.accept(btnVis);

      // Now get a list of all table numbers referenced by the
      // join predicates that we'll be searching.
      JBitSet pNums = new JBitSet(tNums.size());
      Predicate pred = null;
      for (int i = 0; i < predList.size(); i++)
      {
        pred = (Predicate)predList.getOptPredicate(i);
        if (pred.isJoinPredicate())
          pNums.or(pred.getReferencedSet());
      }

      // If tNums and pNums have anything in common, then at
      // least one predicate in the list refers directly to
      // a base table beneath this node (as opposed to referring
View Full Code Here

Examples of org.apache.felix.ipojo.manipulator.spi.Predicate

    /**
     * Restrict to the given {@link ElementType}.
     * @param type expected {@link ElementType}
     */
    public static Predicate on(final ElementType type) {
        return new Predicate() {
            public boolean matches(BindingContext context) {
                return context.getElementType().equals(type);
            }
        };
    }
View Full Code Here

Examples of org.apache.jackrabbit.commons.predicate.Predicate

    /**
     * Filtering ignored properties from the given properties.
     */
    private Iterator<Property> filterProperties(Iterator<Property> properties) {
        return new FilterIterator<Property>(properties, new Predicate() {
            public boolean evaluate(Object object) {
                try {
                    Property p = (Property) object;
                    return !ignoredProperties.contains(p.getName());
                }
View Full Code Here

Examples of org.apache.oozie.test.XTestCase.Predicate

        final String jobId = engine.submitJob(conf, true);

        //TODO CHECK, without this we get JPA concurrency exceptions, ODD
        Thread.sleep(1000);

        waitFor(5000, new Predicate() {
            public boolean evaluate() throws Exception {
                return (engine.getJob(jobId).getStatus() == WorkflowJob.Status.RUNNING);
            }
        });

        Thread.sleep(1000);
        final WorkflowStore store = Services.get().get(WorkflowStoreService.class).create();
        store.beginTrx();
        List<WorkflowActionBean> actions = store.getActionsForWorkflow(jobId, false);
        WorkflowActionBean action = actions.get(0);
        final String actionId = action.getId();
        assertEquals(WorkflowActionBean.Status.RUNNING, action.getStatus());
        String actionConf = action.getConf();
        String fixedActionConf = actionConf.replaceAll("async", "sync");
        action.setConf(fixedActionConf);
        action.setPending();
        store.updateAction(action);
        store.commitTrx();
        store.closeTrx();

        Runnable recoveryRunnable = new RecoveryRunnable(0, 60, 60);
        recoveryRunnable.run();
        Thread.sleep(3000);

        final WorkflowStore store2 = Services.get().get(WorkflowStoreService.class).create();
        assertEquals(WorkflowJob.Status.RUNNING, engine.getJob(jobId).getStatus());
        store2.beginTrx();
        WorkflowActionBean action2 = store2.getAction(actionId, false);
        assertEquals(WorkflowActionBean.Status.RUNNING, action2.getStatus());
        action2.setStatus(WorkflowActionBean.Status.PREP);
        action2.setPending();
        store2.updateAction(action2);
        store2.commitTrx();
        store2.closeTrx();

        Thread.sleep(1000);
        recoveryRunnable.run();
        Thread.sleep(3000);

        waitFor(10000, new Predicate() {
            public boolean evaluate() throws Exception {
                return (engine.getWorkflowAction(actionId).getStatus() == WorkflowActionBean.Status.OK);
            }
        });
View Full Code Here

Examples of org.apache.openjpa.persistence.query.Predicate

        emf.createEntityManager();
    }
   
    public void testLogicalPredicateAssociativity() {
        DomainObject e = qb.createQueryDefinition(Employee.class);
        Predicate p1 = e.get("salary").greaterThan(100);
        Predicate p2 = e.get("rating").equal(5);
        Predicate p3 = e.get("name").like("John");
        Predicate w1 = p1.and(p2.or(p3));
        Predicate w2 = (p1.and(p2)).or(p3);
        QueryDefinition q1 = e.select(e).where(w1);
        String jpql1 = qb.toJPQL(q1);
        emf.createEntityManager().createDynamicQuery(q1).getResultList();
       
        QueryDefinition q2 = e.select(e).where(w2);
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.transport.Predicate

        return _conn;
    }

    public void awaitOpen() throws TimeoutException, InterruptedException
    {
        getEndpoint().waitUntil(new Predicate()
        {
            @Override
            public boolean isSatisfied()
            {
                return getEndpoint().isOpen() || getEndpoint().isClosed();
View Full Code Here

Examples of org.dmg.pmml.Predicate

  private static void buildTree( ModelSchema modelSchema, Tree tree, Node parent )
    {
    for( Node child : parent.getNodes() )
      {
      Predicate predicate = child.getPredicate();

      tree.addPredicate( parent.getId(), child.getId(), getPredicateFor( modelSchema, predicate ), child.getScore() );

      buildTree( modelSchema, tree, child );
      }
View Full Code Here

Examples of org.gocha.collection.Predicate

         * @param source Образец для сравнения
         * @return Предикат
         */
        public static Predicate<? super CharSequence> equals(CharSequence source){
            final CharSequence src = source;
            return new Predicate() {
                @Override
                public boolean validate(Object value) {
                    if( src==null && value==null )return true;
                    if( src!=null && value==null )return false;
                    if( src==null && value!=null )return false;
View Full Code Here

Examples of org.infinispan.objectfilter.impl.predicateindex.Predicate

         throw new IllegalStateException("Unexpected *Expr node type: " + child);
      }
   }

   private void makePredicateNode(BENode parent, List<BENode> nodes, List<Integer> treeCounters, PrimaryPredicateExpr condition, boolean isNegated) {
      Predicate predicate = makePredicate(condition);
      List<String> propertyPath = ((PropertyValueExpr) condition.getChild()).getPropertyPath();
      List<AttributeId> translatedPath = attributePathTranslator.translatePath(propertyPath);
      boolean isRepeated = attributePathTranslator.isRepeated(propertyPath);
      PredicateNode node = new PredicateNode<AttributeId>(parent, predicate, isNegated, translatedPath, isRepeated);
      node.setLocation(nodes.size(), nodes.size() + 1);
View Full Code Here

Examples of org.jaxen.expr.Predicate

    }
   
    public void endPredicate() throws JaxenException
    {
        //System.err.println("endPredicate()");
        Predicate predicate = getXPathFactory().createPredicate( (Expr) pop() );

        popFrame();

        push( predicate );
    }
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.