Examples of Predicate


Examples of com.mysema.query.types.Predicate

  }

  public void serialize(QueryMetadata metadata, boolean forCountRow, @Nullable String projection) {
    List<? extends Expression<?>> select = metadata.getProjection();
    List<JoinExpression> joins = metadata.getJoins();
    Predicate where = metadata.getWhere();
    List<? extends Expression<?>> groupBy = metadata.getGroupBy();
    Predicate having = metadata.getHaving();
    List<OrderSpecifier<?>> orderBy = metadata.getOrderBy();

    // select
    boolean inProjectionOrig = inProjection;
    inProjection = true;
View Full Code Here

Examples of com.mysql.clusterj.query.Predicate

        // parameter name
        PredicateOperand param = dobj.param("eid");
        // property name
        PredicateOperand column = dobj.get("eid");
        // compare the column with the parameter
        Predicate compare = column.equal(param);
        // set the where clause into the query
        dobj.where(compare);
        // create a query instance
        Query query = session.createQuery(dobj);
View Full Code Here

Examples of com.psddev.dari.db.Predicate

    public static Predicate getVisibilitiesPredicate(ObjectType selectedType, Collection<String> visibilities, Set<UUID> validTypeIds, boolean showDrafts) {

        Set<UUID> visibilityTypeIds = new HashSet<UUID>();

        Predicate visibilitiesPredicate = null;

        for (String visibility : visibilities) {
            if ("p".equals(visibility)) {
                Set<String> comparisonKeys = new HashSet<String>();
                DatabaseEnvironment environment = Database.Static.getDefault().getEnvironment();
View Full Code Here

Examples of com.tinkerpop.blueprints.Predicate

    stub(mockGraphQuery.has("", "bar")).toReturn(mockGraphQuery);
    query.has("", "bar");
    verify(mockGraphQuery).has("", "bar");
   
   
    Predicate predicate = new Predicate() {
     
      @Override
      public boolean evaluate(Object first, Object second) {
        return false;
      }
View Full Code Here

Examples of com.ximpleware.extended.xpath.Predicate

    resetP(vn);
    position = 1;
  }
 
  public void resetP(VTDNavHuge vn){
    Predicate temp = p;
    while(temp!=null){
      temp.reset(vn);
      temp = temp.nextP;
    }
  }
View Full Code Here

Examples of common.model.Predicate

          Type.Int));
    }
    // Range Check
    for (int i = 0; i < total; i++) {
      String var = MessageFormat.format(varPattern, i);
      result.add(new Assert(new Predicate(Operator.AND, new Predicate(
          Operator.GE, new Variable(var), new Constant(1)),
          new Predicate(Operator.LE, new Variable(var), new Constant(
              size * size)))));
    }
    // Assigned values
    for (int[] assign : assigned) {
      String var = MessageFormat.format(varPattern,
          translate(assign[0], assign[1]));
      result.add(new Assert(new Predicate(Operator.EQUAL, new Variable(
          var), new Constant(assign[2]))));
    }
    // Limitations
    // Columns and rows
    for (int i = 0; i < size * size; i++) {
      for (int j = 0; j < size * size; j++) {
        for (int k = j + 1; k < size * size; k++) {
          result.add(new Assert(new Predicate(Operator.NOT,
              new Predicate(Operator.EQUAL, new Variable(
                  MessageFormat.format(varPattern,
                      translate(i, j))), new Variable(
                  MessageFormat.format(varPattern,
                      translate(i, k)))))));
          result.add(new Assert(new Predicate(Operator.NOT,
              new Predicate(Operator.EQUAL, new Variable(
                  MessageFormat.format(varPattern,
                      translate(j, i))), new Variable(
                  MessageFormat.format(varPattern,
                      translate(k, i)))))));
          result.add(new Assert(new Predicate(Operator.NOT,
              new Predicate(Operator.EQUAL, new Variable(
                  MessageFormat.format(varPattern,
                      sqrtranslate(i, j))), new Variable(
                  MessageFormat.format(varPattern,
                      sqrtranslate(i, k)))))));
        }
View Full Code Here

Examples of cs227b.teamIago.resolver.Predicate

//    else
      res = new NotOp(parseExpression(s.members.get(0)));
  }
  // 2. Associations
  else {
    res = new Predicate(opt, parseExpList(s.members));
  }
  return res;
}
View Full Code Here

Examples of de.FeatureModellingTool.DupHelper.ConstraintTransform.Predicate

  }
 
  public static boolean checkGroupConstraint(GroupConstraint gc , ConstraintModel cm , ConstraintModelEditor cme , DrawingView dv
      , CustomizationVersion cv
      , HashMap<String,Figure> mFigure) {
    Predicate pred = PredicateHelper.getPredicateByGroupConstraintType(gc.getType());
    PredicateHelper.fillPredicate(gc.getFeatureSet() , gc , cm, cv , pred);
   
    if (gc.getType().equals(GroupConstraintType.SingleGroup)) {
      if (pred.getSelectedCount()==0) {
        if (pred.getUndecidedCount()==0) {
          removeGroupConstraint(gc , cm , cme , dv , mFigure);
          return true;
        } else {
          removeGroupConstraintRelations(gc , cm , cme , dv , mFigure , cv);
          return true;
        }
      } else if (pred.getSelectedCount()==1) {
        if (pred.getUndecidedCount()==0) {
          removeGroupConstraint(gc , cm , cme , dv , mFigure);
          return true;
        } else {
          return false; //CheckResult.crFlood;
        }
      } else {
        return false; //CheckResult.crError;
      }
    } else if (gc.getType().equals(GroupConstraintType.AllGroup)) {
      if (pred.getSelectedCount()==0) {
        if (pred.getUnselectedCount()==0) {
          removeGroupConstraintRelations(gc , cm , cme , dv , mFigure , cv);
          return true;
        } else {
          if (pred.getUndecidedCount()==0) {
            removeGroupConstraint(gc , cm , cme , dv , mFigure);
            return true;
          } else {
            return false; //CheckResult.crFlood;
          }
        }
      } else {
        if (pred.getUnselectedCount()==0) {
          if (pred.getUndecidedCount()==0) {
            removeGroupConstraint(gc , cm , cme , dv , mFigure);
            return true;
          } else {
            return false; //CheckResult.crFlood;
          }
        } else {
          return false; //CheckResult.crError;
        }
      }
    } else {
      if (pred.getUndecidedCount()==0) {
        removeGroupConstraint(gc , cm , cme , dv , mFigure);
        return true;
      } else {
        removeGroupConstraintRelations(gc , cm , cme , dv , mFigure , cv);
        return true;
View Full Code Here

Examples of de.itemis.tooling.xturtle.xturtle.Predicate

    Map<String,String> userData=new HashMap<String,String>();
    if(namesProvider!=null){
      List<String>labels=new ArrayList<String>();
      List<String>descriptions=new ArrayList<String>();
      for (PredicateObjectList predList : triples.getPredObjs()) {
        Predicate verb = predList.getVerb();
        QualifiedName verbName = service.getQualifiedName(verb);
        if(namesProvider.getLabelNames().contains(verbName)){
          labels.addAll(getStringLiteralValues(predList,Optional.<Set<String>>absent()));
        }else if(namesProvider.getDescriptionNames().contains(verbName)){
          descriptions.addAll(getStringLiteralValues(predList,Optional.of(namesProvider.getDescriptionLanguages())));
View Full Code Here

Examples of edu.cmu.cs.fusion.constraint.Predicate

  @Test
  public void testAndPredicate() throws ParseException {
    String string = "a AND b";
   
    FPLParser parser = new FPLParser(string, null, null);
    Predicate pred = parser.expression();
   
    Assert.assertTrue("Parsed predicate should be a AndPredicate, but is " + pred.getClass().getCanonicalName(), pred instanceof AndPredicate);
   
    AndPredicate val = (AndPredicate)pred;
   
    Assert.assertTrue("Left side is a bool value", val.getLeft() instanceof BooleanValue);
    Assert.assertTrue("Right side is a bool value", val.getRight() instanceof BooleanValue);
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.