Examples of between()


Examples of com.mysql.clusterj.query.PredicateOperand.between()

        // parameter name
        PredicateOperand upper = dobj.param("upper");
        // property name
        PredicateOperand column = dobj.get("id");
        // compare the column with the parameter
        Predicate compare = column.between(lower, upper);
        // set the where clause into the query
        dobj.where(compare);
        // create a query instance
        Query query = session.createQuery(dobj);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()

      criteriaQuery.from(Cliente.class);

    criteriaQuery
      .select(root)
      .where(
        criteriaBuilder
         .between(root.get("idade").as(Integer.class), idadeInicial, idadeFinal)           
      );

    return entityManager
      .createQuery(criteriaQuery)
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()

   
   
    criteriaQuery
      .select(root)
      .where(
        criteriaBuilder.between(
          root.get("endereco").get("numero").as(Integer.class),
          numeroEnderecoIncial,
          numeroEnderecoFinal)
      );
       
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()

   
    criteriaQuery.select(root)
      .where(
        criteriaBuilder.and(
            criteriaBuilder.equal(root.get("agenda").get("colaborador"), colaborador ),
            criteriaBuilder.between(root.get("dataIncial").as(Date.class), dataInicial, dataFinal)
          )
      );
   
    return entityManager
      .createQuery(criteriaQuery)
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()

   
   
    criteriaQuery.select(root)
      .where(
          criteriaBuilder.and(
              criteriaBuilder.between(root.get("dataTransacao").as(Date.class), dataInicial, dataFinal),
              criteriaBuilder.equal(root.get("conta"),conta)
            )
        ).orderBy(
            criteriaBuilder.asc(root.get("dataTransacao").as(Date.class))
          );
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()


    criteriaQuery.select(root)
      .where(
          criteriaBuilder.and(
            criteriaBuilder.between(root.get("dataLancamento").as(Date.class), dataInicial, dataFinal),
            criteriaBuilder.equal(root.get("colaborador"), colaborador)
          )
        ).orderBy(
            criteriaBuilder.asc(root.get("dataLancamento").as(Date.class))
          );
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()


    criteriaQuery.select(root)
      .where(
          criteriaBuilder.and(
            criteriaBuilder.between(root.get("dataLancamento").as(Date.class), dataInicial, dataFinal),
            criteriaBuilder.equal(root.get("cliente"), cliente)
          )
        ).orderBy(
            criteriaBuilder.asc(root.get("dataLancamento").as(Date.class))
          );
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()

            predicates.add(matchAuthor);
        }
        // for price fields, also the comparison operation changes based on whether
        // minimum or maximum price or both have been filled.
        if (minPrice != null && maxPrice != null) {
            Predicate matchPrice = cb.between(book.get(Book_.price), minPrice, maxPrice);
            predicates.add(matchPrice);
        } else if (minPrice != null && maxPrice == null) {
            Predicate matchPrice = cb.ge(book.get(Book_.price), minPrice);
            predicates.add(matchPrice);
        } else if (minPrice == null && maxPrice != null) {
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()

        if(createdBy != null) {
            where = cb.and(where, cb.equal(z.get(Request_.createdBy), createdBy));
        }
       
        if(createdDateBegin != null && createdDateEnd != null) {
            where = cb.and(where, cb.between(z.get(Request_.createdDate), createdDateBegin, createdDateEnd));
        }
       
        if(description != null) {
            where = cb.and(where, cb.like(z.get(Request_.description), "%" + description + "%"));
        }
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.between()

        if(stateRequest != null) {
            where = cb.and(where, cb.equal(z.get(Request_.stateRequest), stateRequest));
        }
       
        if(stateDateBegin != null && stateDateEnd != null) {
            where = cb.and(where, cb.between(z.get(Request_.stateDate), stateDateBegin, stateDateEnd));
        }
   
        if(perfomer != null) {
            where = cb.and(where, cb.equal(z.get(Request_.performer), perfomer));
        }
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.