Examples of having()


Examples of org.infinispan.query.dsl.QueryFactory.having()

   public void testWrongQueryBuilding4() throws Exception {
      QueryFactory qf = Search.getSearchManager(cache).getQueryFactory();

      Query q = qf.from(User.class)
            .not(qf.having("name").eq("John")).toBuilder()
            .not(qf.having("surname").eq("Man")).toBuilder()
            .build();
   }

   @Test(expectedExceptions = IllegalStateException.class)
   public void testWrongQueryBuilding5() throws Exception {
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

   @Test(expectedExceptions = IllegalStateException.class)
   public void testWrongQueryBuilding5() throws Exception {
      QueryFactory qf = Search.getSearchManager(cache).getQueryFactory();

      Query q = qf.from(User.class)
            .not(qf.having("name").eq("John")).toBuilder()
            .not(qf.having("surname").eq("Man")).toBuilder()
            .build();
   }

   @Test(expectedExceptions = IllegalArgumentException.class)
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

   public void testWrongQueryBuilding5() throws Exception {
      QueryFactory qf = Search.getSearchManager(cache).getQueryFactory();

      Query q = qf.from(User.class)
            .not(qf.having("name").eq("John")).toBuilder()
            .not(qf.having("surname").eq("Man")).toBuilder()
            .build();
   }

   @Test(expectedExceptions = IllegalArgumentException.class)
   public void testWrongQueryBuilding6() throws Exception {
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

      expectedException.expect(IllegalArgumentException.class);
      expectedException.expectMessage("The given condition was created by a different factory");

      qf1.from("MyDummyType")
            .not(qf2.having("attr1").eq("1")); // exception expected
   }

   @Test
   public void testWithDifferentFactory2() {
      QueryFactory qf1 = new DummyQueryFactory();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

      expectedException.expect(IllegalArgumentException.class);
      expectedException.expectMessage("The given condition was created by a different factory");

      qf1.from("MyDummyType")
            .having("attr1").eq("1")
            .and(qf2.having("attr2").eq("2")); // exception expected
   }

   @Test
   public void testWithDifferentFactory3() {
      QueryFactory qf1 = new DummyQueryFactory();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

      expectedException.expect(IllegalArgumentException.class);
      expectedException.expectMessage("The given condition was created by a different factory");

      qf1.from("MyDummyType")
            .having("attr1").eq("1")
            .or(qf2.having("attr2").eq("2")); // exception expected
   }

   @Test
   public void testWithDifferentBuilder1() {
      QueryFactory qf1 = new DummyQueryFactory();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

   @Test
   public void testWithDifferentBuilder1() {
      QueryFactory qf1 = new DummyQueryFactory();

      FilterConditionContext fcc = qf1.having("attr1").eq("1");

      Query q1 = qf1.from("MyDummyType")
            .not(fcc)
            .toBuilder().build();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

   @Test
   public void testWithDifferentBuilder2() {
      QueryFactory qf1 = new DummyQueryFactory();

      FilterConditionContext fcc = qf1.having("attr1").eq("1");

      Query q1 = qf1.from("MyDummyType")
            .not(fcc)
            .toBuilder().build();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

   @Test
   public void testWithDifferentBuilder3() {
      QueryFactory qf1 = new DummyQueryFactory();

      FilterConditionContext fcc = qf1.having("attr1").eq("1");

      Query q1 = qf1.from("MyDummyType")
            .not(fcc)
            .toBuilder().build();
View Full Code Here

Examples of org.infinispan.query.dsl.QueryFactory.having()

   public void testAnd2() throws Exception {
      QueryFactory qf = getQueryFactory();

      Query q = qf.from(getModelFactory().getUserImplClass())
            .having("name").eq("Spider")
            .and(qf.having("surname").eq("Man"))
            .toBuilder().build();

      List<User> list = q.list();
      assertEquals(1, list.size());
      assertEquals(2, list.get(0).getId());
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.