Examples of QueryFactory


Examples of com.aneeshpu.dpdeppop.query.QueryFactory

        this.columnCreationStrategy = columnCreationStrategy;
        return this;
    }

    public RecordBuilder withQueryFactory(final Connection connection) {
        this.queryFactory = new QueryFactory();
        return this;
    }
View Full Code Here

Examples of org.emftrace.metamodel.QUARCModel.Query.QueryFactory

    ConstraintsFactory constraintsFactory = new ConstraintsFactoryImpl();
   
    TechnicalPropertiesCatalogue technicalPropertiesCatalogue = constraintsFactory.createTechnicalPropertiesCatalogue();
    PredefinedConstraintSetCatalogue predefinedConstraintSetCatalogue = constraintsFactory.createPredefinedConstraintSetCatalogue();
   
    QueryFactory queryFactory = new QueryFactoryImpl();
   
    GSSQueryContainment gssQueryContainment = queryFactory.createGSSQueryContainment();

    toolbox.setGssCatalogue(gss);
    toolbox.setTagsCatalogue(tags);
    toolbox.setPredefinedContraintsSetCatalogue(predefinedConstraintSetCatalogue);
    toolbox.setPropertiesCatalogue(technicalPropertiesCatalogue);
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory

      List<User> list = q.list();
      assertEquals(0, list.size());
   }

   public void testAnd4() throws Exception {
      QueryFactory qf = Search.getQueryFactory(remoteCache);

      //test for parenthesis, "and" should have higher priority
      Query q = qf.from(User.class)
            .having("name").eq("Spider")
            .or(qf.having("name").eq("John"))
            .and(qf.having("surname").eq("Man"))
            .toBuilder().build();

      List<User> list = q.list();
      assertEquals(2, list.size());
   }
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory

      List<User> list = q.list();
      assertEquals(2, list.size());
   }

   public void testOr1() throws Exception {
      QueryFactory qf = Search.getQueryFactory(remoteCache);

      Query q = qf.from(User.class)
            .having("surname").eq("Man")
            .or().having("surname").eq("Woman")
            .toBuilder().build();

      List<User> list = q.list();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory

         assertEquals("Spider", u.getName());
      }
   }

   public void testOr2() throws Exception {
      QueryFactory qf = Search.getQueryFactory(remoteCache);

      Query q = qf.from(User.class)
            .having("surname").eq("Man")
            .or(qf.having("surname").eq("Woman"))
            .toBuilder().build();

      List<User> list = q.list();
      assertEquals(2, list.size());
      for (User u : list) {
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory

         assertEquals("Spider", u.getName());
      }
   }

   public void testOr3() throws Exception {
      QueryFactory qf = Search.getQueryFactory(remoteCache);

      Query q = qf.from(User.class)
            .having("gender").eq(User.Gender.MALE)
            .or().having("gender").eq(User.Gender.FEMALE)
            .toBuilder().build();

      List<User> list = q.list();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory

      List<User> list = q.list();
      assertEquals(3, list.size());
   }

   public void testNot1() throws Exception {
      QueryFactory qf = Search.getQueryFactory(remoteCache);

      Query q = qf.from(User.class)
            .not().having("name").eq("Spider")
            .toBuilder().build();

      List<User> list = q.list();
      assertEquals(1, list.size());
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory

      assertEquals(1, list.size());
      assertEquals("John", list.get(0).getName());
   }

   public void testNot2() throws Exception {
      QueryFactory qf = Search.getQueryFactory(remoteCache);

      Query q = qf.from(User.class)
            .not().not().having("surname").eq("Doe")
            .toBuilder().build();

      List<User> list = q.list();
      assertEquals(1, list.size());
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory

      assertEquals(1, list.size());
      assertEquals("John", list.get(0).getName());
   }

   public void testNot3() throws Exception {
      QueryFactory qf = Search.getQueryFactory(remoteCache);

      // NOT should have higher priority than AND
      Query q = qf.from(User.class)
            .not().having("name").eq("John")
            .and().having("surname").eq("Man")
            .toBuilder().build();

      List<User> list = q.list();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory

      assertEquals(1, list.size());
      assertEquals("Spider", list.get(0).getName());
   }

   public void testNot4() throws Exception {
      QueryFactory qf = Search.getQueryFactory(remoteCache);

      // NOT should have higher priority than AND
      Query q = qf.from(User.class)
            .having("surname").eq("Man")
            .and().not().having("name").eq("John")
            .toBuilder().build();

      List<User> list = q.list();
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.