Examples of InCriterion


Examples of net.sf.minuteProject.architecture.filter.data.InCriterion

    criteria.addCriterion(getInPk(field, ids));
    return criteria;
  }

  private ClauseCriterion getInPk(String field, List<String> ids) {
    InCriterion inCriterion = new InCriterion(field, ids, true);
    return inCriterion;
  }     
View Full Code Here

Examples of net.sf.minuteProject.architecture.filter.data.InCriterion

    criteria.addCriterion(getInPk(field, ids));
    return criteria;
  }

  private ClauseCriterion getInPk(String field, List<String> ids) {
    InCriterion inCriterion = new InCriterion(field, ids, true);
    return inCriterion;
  }     
View Full Code Here

Examples of net.sf.minuteProject.architecture.filter.data.InCriterion

    criteria.addCriterion(getInPk(field, ids));
    return criteria;
  }

  private ClauseCriterion getInPk(String field, List<String> ids) {
    InCriterion inCriterion = new InCriterion(field, ids, true);
    return inCriterion;
  }     
View Full Code Here

Examples of org.dayatang.domain.internal.InCriterion

     * Test of in method, of class CriteriaQuery.
     */
    @Test
    public void testInCollection() {
        List<?> criterions = Arrays.asList("a", "b");
      assertEquals(new InCriterion("name", criterions), instance.in("name", criterions).getQueryCriterion());
    }
View Full Code Here

Examples of org.dayatang.domain.internal.InCriterion

     * Test of in method, of class CriteriaQuery.
     */
    @Test
    public void testInArray() {
        Object[] criterions = new Object[] {"a", "b"};
      assertEquals(new InCriterion("name", criterions), instance.in("name", criterions).getQueryCriterion());
    }
View Full Code Here

Examples of org.dayatang.domain.internal.InCriterion

    }
   
    @Test
    public void testGetQueryString() {
      EqCriterion criterion1 = new EqCriterion("name", "abc");
      InCriterion criterion2 = new InCriterion("age", Arrays.asList(1, 2));
        instance.eq("name", "abc")
                        .isEmpty("post")
                        .notNull("birthday")
                        .in("age", Arrays.asList(1, 2))
                        .getQueryString();       
        assertEquals("select distinct(rootEntity) from org.dayatang.domain.entity.MyEntity as rootEntity  "
                + "where rootEntity.name = :rootEntity_name" + criterion1.hashCode() + " "
                + "and rootEntity.post is empty "
                + "and rootEntity.birthday is not null "
                + "and rootEntity.age in :rootEntity_age" + criterion2.hashCode(),
                instance.getQueryString());
        assertEquals(NamedParameters.create()
                .add("rootEntity_name" + criterion1.hashCode(), "abc")
                .add("rootEntity_age" + criterion2.hashCode(), Arrays.asList(1, 2)),
                instance.getParameters());
    }
View Full Code Here

Examples of org.dayatang.domain.internal.InCriterion

    }
   
    @Test
    public void testGetQueryString2() {
      EqCriterion criterion1 = new EqCriterion("name", "abc");
      InCriterion criterion2 = new InCriterion("age", Arrays.asList(1, 2));
     
     
        assertEquals("select distinct(rootEntity) from org.dayatang.domain.entity.MyEntity as rootEntity  "
                + "where rootEntity.name = :rootEntity_name" + criterion1.hashCode() + " "
                + "and rootEntity.post is empty "
                + "and rootEntity.birthday is not null "
                + "and rootEntity.age in :rootEntity_age" + criterion2.hashCode() + " "
                + "order by rootEntity.name asc",
                instance.eq("name", "abc")
                        .isEmpty("post")
                        .notNull("birthday")
                        .in("age", Arrays.asList(1, 2))
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.