Examples of CriteriaQuery


Examples of javax.persistence.criteria.CriteriaQuery

    }

    public void testEqualWithAttributeAndLiteral() {
        String jpql = "select a from Account a where a.balance=100";

        CriteriaQuery c = cb.createQuery();
        Root<Account> account = c.from(Account.class);
        c.select(account).where(cb.equal(account.get(Account_.balance), 100));

        assertEquivalence(c, jpql);
    }
View Full Code Here

Examples of org.dayatang.domain.CriteriaQuery

    private Class<MyEntity> entityClass = MyEntity.class;
   
    @Before
    public void setUp() {
        repository = mock(EntityRepository.class);
        instance = new CriteriaQuery(repository, entityClass);
    }
View Full Code Here

Examples of org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery

    String businessKey = oConvertUtils.getString(request.getParameter("businessKey"));
    String subclassname = oConvertUtils.getString(request.getParameter("subclassname"));// 子类类名
    String type = oConvertUtils.getString(request.getParameter("typename"));
    String code = oConvertUtils.getString(request.getParameter("typecode"));
    String filekey = oConvertUtils.getString(request.getParameter("filekey"));
    CriteriaQuery cq = new CriteriaQuery(MyClassLoader.getClassByScn(subclassname), dataGrid);
    cq.eq("businessKey", businessKey);
    if (StringUtil.isNotEmpty(type)) {
      cq.createAlias("TBInfotype", "TBInfotype");
      cq.eq("TBInfotype.typename", type);
    }
    if (StringUtil.isNotEmpty(filekey)) {
      cq.eq("id", filekey);
    }
    if (StringUtil.isNotEmpty(code)) {
      cq.createAlias("TBInfotype", "TBInfotype");
      cq.eq("TBInfotype.typecode", code);
    }
    cq.add();
    this.systemService.getDataGridReturn(cq, true);
    TagUtil.datagrid(response, dataGrid);
  }
View Full Code Here

Examples of org.springframework.data.elasticsearch.core.query.CriteriaQuery

  @Test
  public void shouldFindAuthorMarkersInRangeForGivenCriteriaQuery() {
    //given
    loadClassBaseEntities();
    CriteriaQuery geoLocationCriteriaQuery = new CriteriaQuery(
        new Criteria("location").within(new GeoPoint(45.7806d, 3.0875d), "20km"));
    //when
    List<AuthorMarkerEntity> geoAuthorsForGeoCriteria = elasticsearchTemplate.queryForList(geoLocationCriteriaQuery, AuthorMarkerEntity.class);

    //then
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.