Examples of bool()


Examples of org.eclipse.imp.pdb.facts.IValueFactory.bool()

      } else if (name.equals("isDate")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isDate()), ctx);
      } else if (name.equals("isTime")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isTime()), ctx);
      } else if (name.equals("isDateTime")) {
        return makeResult(getTypeFactory().boolType(), vf.bool(getValue().isDateTime()), ctx);
      } else if (name.equals("justDate")) {
        if (!dt.isTime()) {
          return makeResult(getTypeFactory().dateTimeType(),
              vf.date(dt.getYear(), dt.getMonthOfYear(), dt.getDayOfMonth()), ctx);
        }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IValueFactory.bool()

  }
 

  public static Result<IBool> bool(boolean b, IEvaluatorContext ctx) {
    IValueFactory vf = ctx.getValueFactory();
    IBool result = vf.bool(b);
    return new BoolResult(result.getType(), result, ctx);
  }
 
  private static class Visitor implements ITypeVisitor<Result<? extends IValue>, RuntimeException> {
    private IValue value;
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.bool()

           .andField("categories.name:ngrams").boostedTo(0.2f)
           .matching(textQuery)
           .createQuery();
       
        //Combine them for best results, note exact uses an higher boost:
        Query fullTextQuery = queryBuilder.bool()
           .should(queryToFindMathingNGrams)
           .should(queryToFindExactTerms)
           .createQuery();
       
        log.info("Executing fulltext query {0}", fullTextQuery);
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.bool()

         .andField("body:ngrams").boostedTo(0.4f)
         .matching(searchPattern)
         .createQuery();
     
      //Combine them for best results:
      Query fullTextQuery = queryBuilder.bool()
         .should(queryUsingEnglishStemmer)
         .should(queryUsingNGrams)
         .createQuery();
     
      return fullTextQuery;
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.bool()

         }
         sort = new Sort(sortField);
      }

      QueryBuilder qb = searchManager.getSearchFactory().buildQueryBuilder().forEntity(parsingResult.getTargetEntity()).get();
      Query q = qb.bool()
            .must(qb.keyword().onField(TYPE_FIELD_NAME).ignoreFieldBridge().matching(parsingResult.getTargetType().getFullName()).createQuery())
            .must(parsingResult.getQuery())
            .createQuery();

      CacheQuery cacheQuery = searchManager.getQuery(q, parsingResult.getTargetEntity());
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.bool()

         messageDescriptor = parsingResult.getTargetType();
         targetEntity = parsingResult.getTargetEntity();
         projections = parsingResult.getProjections();

         QueryBuilder qb = searchManager.getSearchFactory().buildQueryBuilder().forEntity(targetEntity).get();
         luceneQuery = qb.bool()
               .must(qb.keyword().onField(TYPE_FIELD_NAME).ignoreFieldBridge().matching(messageDescriptor.getFullName()).createQuery())
               .must(parsingResult.getQuery())
               .createQuery();
      }
View Full Code Here

Examples of org.jboss.test.annotation.factory.support.Complex.bool()

      assertEquals(9,9, complex.flt());
      assertEquals(123456789.99, complex.dbl());
      assertEquals(1, complex.shrt());
      assertEquals(987654321, complex.lng());
      assertEquals(123, complex.integer());
      assertEquals(true, complex.bool());
      assertEquals(Long.class, complex.clazz());
      assertEquals("Yes", complex.annotation().value());
      assertEquals(new String[]{"Test", "123"}, complex.array());
      assertEquals(MyEnum.TWO, complex.enumVal());
      assertArrays(new int[]{1, 2, 3}, complex.primitiveArray());
View Full Code Here

Examples of org.jboss.test.annotation.factory.support.Complex.bool()

      assertEquals(9,9, complex.flt());
      assertEquals(123456789.99, complex.dbl());
      assertEquals(1, complex.shrt());
      assertEquals(987654321, complex.lng());
      assertEquals(123, complex.integer());
      assertEquals(true, complex.bool());
      assertEquals(Long.class, complex.clazz());
      assertEquals("Yes", complex.annotation().value());
      assertEquals(new String[]{"Test", "123"}, complex.array());
      assertEquals(MyEnum.TWO, complex.enumVal());
      assertArrays(new int[]{1, 2, 3}, complex.primitiveArray());
View Full Code Here

Examples of org.jboss.test.annotation.factory.support.ComplexWithDefault.bool()

      assertEquals(1.0, complex.flt());
      assertEquals(2.3, complex.dbl());
      assertEquals(2, complex.shrt());
      assertEquals(123456789, complex.lng());
      assertEquals(123, complex.integer());
      assertEquals(true, complex.bool());
      assertEquals(String.class, complex.clazz());
      assertEquals(MyEnum.ONE, complex.enumVal());
      assertEquals("default", complex.annotation().value());
      assertEquals(new String[]{"The", "defaults"}, complex.array());
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.