Examples of Comparison


Examples of com.foundationdb.server.types.texpressions.Comparison

                                                 subqueryNode.getFetchFirst(),
                                                 false);
            if (subquery instanceof ResultSet)
                subquery = ((ResultSet)subquery).getInput();
            boolean negate = false;
            Comparison comp = Comparison.EQ;
            List<ExpressionNode> operands = null;
            ExpressionNode operand = null;
            boolean needOperand = false, multipleOperands = false;
            //ConditionList innerConds = null;
            switch (subqueryNode.getSubqueryType()) {
View Full Code Here

Examples of com.jbidwatcher.util.Comparison

    final String identifier = ((String)deQ).substring(start+1);
    String command = ((String)deQ).substring(0, start);
    int activeRow = currentRow == null ? 0 : currentRow.intValue();

    if(command.equals("start")) {
      currentRow = ((auctionTableModel)getModel()).findRow(new Comparison() {
        public boolean match(Object o) {
          String foundIdentifier = null;
          if(o != null) foundIdentifier = ((AuctionEntry)o).getIdentifier();
          return foundIdentifier != null && foundIdentifier.equals(identifier);
        }
View Full Code Here

Examples of com.redspr.redquerybuilder.core.client.expression.Comparison

                .getTableFilter(ref.getTable());

        TableFilter refTableFilter = session.createTableFilter(ref
                .getRefTable());

        Comparison joinCond = new Comparison(session, Operator.EQUAL,
                new ExpressionColumn(session, null, tableFilter.getAlias(), ref
                        .getColumns()[0].getName()), new ExpressionColumn(
                        session, null, refTableFilter.getAlias(), ref
                                .getRefColumns()[0].getName()));
        tableFilter.addJoin(refTableFilter, false, joinCond);
View Full Code Here

Examples of er.neo4jadaptor.query.expression.sentence.Comparison

    // now process the last bit
    String last = splits[splits.length-1];
   
    if (entity.attributeNamed(last) != null) {
      // it's a plain attribute value comparison
      return new Comparison(rels, entity.attributeNamed(last), operator, value);
    } else {
      // it's a relationship value comparison, let's represent it as attribute comparison
      EORelationship lastRel = entity.relationshipNamed(last);
      EOAttribute srcAtt = asOne(lastRel.sourceAttributes());
      EOAttribute dstAtt = asOne(lastRel.destinationAttributes());
     
      rels.add(lastRel);
      if (value != null) {
        value = ((NSKeyValueCoding) value).valueForKey(dstAtt.name());
      }
      return new Comparison(rels, srcAtt, operator, value);
    }
  }
View Full Code Here

Examples of javax.jcr.query.qom.Comparison

    public void testComparison() throws RepositoryException {
        PropertyValue op1 = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        BindVariableValue op2 = qf.bindVariable(VARIABLE_NAME);
        for (Iterator it = OPERATORS.iterator(); it.hasNext(); ) {
            String operator = (String) it.next();
            Comparison comp = qf.comparison(op1, operator, op2);
            assertTrue("Not a PropertyValue operand", comp.getOperand1() instanceof PropertyValue);
            assertTrue("Not a BindVariableValue operand", comp.getOperand2() instanceof BindVariableValue);
            assertEquals("Wrong operator", operator, comp.getOperator());
        }
    }
View Full Code Here

Examples of javax.jcr.query.qom.Comparison

            return getSelectorNames(not.getConstraint());
        } else if (constraint instanceof PropertyExistence) {
            PropertyExistence pe = (PropertyExistence) constraint;
            return Collections.singleton(pe.getSelectorName());
        } else if (constraint instanceof Comparison) {
            Comparison c = (Comparison) constraint;
            return Collections.singleton(getSelectorName(c.getOperand1()));
        } else if (constraint instanceof SameNode) {
            SameNode sn = (SameNode) constraint;
            return Collections.singleton(sn.getSelectorName());
        } else if (constraint instanceof ChildNode) {
            ChildNode cn = (ChildNode) constraint;
View Full Code Here

Examples of javax.jcr.query.qom.Comparison

    public void testComparison() throws RepositoryException {
        PropertyValue op1 = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        BindVariableValue op2 = qf.bindVariable(VARIABLE_NAME);
        for (Iterator it = OPERATORS.iterator(); it.hasNext(); ) {
            String operator = (String) it.next();
            Comparison comp = qf.comparison(op1, operator, op2);
            assertTrue("Not a PropertyValue operand", comp.getOperand1() instanceof PropertyValue);
            assertTrue("Not a BindVariableValue operand", comp.getOperand2() instanceof BindVariableValue);
            assertEquals("Wrong operator", operator.toString(), comp.getOperator());
        }
    }
View Full Code Here

Examples of javax.jcr.query.qom.Comparison

                filter = other;
            } else if (other != Predicate.TRUE) {
                filter = Predicates.and(filter, other);
            }
        } else if (constraint instanceof Comparison) {
            Comparison c = (Comparison) constraint;
            Transform transform = new Transform(c.getOperand1());
            DynamicOperand left = transform.operand;
            final String operator = c.getOperator();
            StaticOperand right = c.getOperand2();
            if (left instanceof Length
                    || left instanceof FullTextSearchScore
                    || ((!JCR_OPERATOR_EQUAL_TO.equals(operator)
                            || transform.transform != TRANSFORM_NONE)
                            && (left instanceof NodeName
                                    || left instanceof NodeLocalName))) {
                try {
                    int type = PropertyType.UNDEFINED;
                    if (left instanceof Length) {
                        type = PropertyType.LONG;
                    } else if (left instanceof FullTextSearchScore) {
                        type = PropertyType.DOUBLE;
                    }
                    final DynamicOperand operand = c.getOperand1();
                    final Value value = evaluator.getValue(right, type);
                    filter = new RowPredicate() {
                        @Override
                        protected boolean evaluate(Row row)
                                throws RepositoryException {
View Full Code Here

Examples of javax.jcr.query.qom.Comparison

        } else if (constraint instanceof Not) {
            return getNotQuery((Not) constraint, selectorMap, searcher);
        } else if (constraint instanceof PropertyExistence) {
            return getPropertyExistenceQuery((PropertyExistence) constraint);
        } else if (constraint instanceof Comparison) {
            Comparison c = (Comparison) constraint;
            Transform left = new Transform(c.getOperand1());
            return getComparisonQuery(
                    left.operand, left.transform, c.getOperator(),
                    c.getOperand2(), selectorMap);
        } else if (constraint instanceof FullTextSearch) {
            return getFullTextSearchQuery((FullTextSearch) constraint);
        } else if (constraint instanceof SameNode) {
            SameNode sn = (SameNode) constraint;
            return getNodeIdQuery(UUID, sn.getPath());
View Full Code Here

Examples of javax.jcr.query.qom.Comparison

                filter = other;
            } else if (other != Predicate.TRUE) {
                filter = Predicates.and(filter, other);
            }
        } else if (constraint instanceof Comparison) {
            Comparison c = (Comparison) constraint;
            Transform transform = new Transform(c.getOperand1());
            DynamicOperand left = transform.operand;
            final String operator = c.getOperator();
            StaticOperand right = c.getOperand2();
            if (left instanceof Length
                    || left instanceof FullTextSearchScore
                    || (((!JCR_OPERATOR_EQUAL_TO.equals(operator) && !JCR_OPERATOR_LIKE
                            .equals(operator)) || transform.transform != TRANSFORM_NONE) && (left instanceof NodeName || left instanceof NodeLocalName))) {
                try {
                    int type = PropertyType.UNDEFINED;
                    if (left instanceof Length) {
                        type = PropertyType.LONG;
                    } else if (left instanceof FullTextSearchScore) {
                        type = PropertyType.DOUBLE;
                    }
                    final DynamicOperand operand = c.getOperand1();
                    final Value value = evaluator.getValue(right, type);
                    filter = new RowPredicate() {
                        @Override
                        protected boolean evaluate(Row row)
                                throws RepositoryException {
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.