Examples of orderBy()


Examples of adipe.translate.ra.Relation.orderBy()

        boolean asc = ssc.orderingSpecification() == null || ssc.orderingSpecification().ASC() != null;

        if (ssc.sortKey().columnName() != null) {
            SimpleColumn sc = scopeIncludingAliases.getColumnIcShdWrapNambNind(ssc.sortKey().columnName().getText());
            return unordered.orderBy(sc, asc);
        } else {
            int columnNo = visitUnsignedInteger(ssc.sortKey().unsignedInteger());
            return unordered.orderBy(columnNo, asc);
        }
    }
View Full Code Here

Examples of com.datastax.driver.core.querybuilder.Select.orderBy()

                    }

                    select = select.limit(bindMarker());

                    if (kind == Kind.REVERSED_SLICE)
                        select = select.orderBy(desc(mapper.clusteringColumns.get(0).getColumnName()));

                    return select.toString();
                }
        }
        throw new AssertionError();
View Full Code Here

Examples of com.mysema.query.jpa.hibernate.HibernateQuery.orderBy()

    if (newerThan != null) {
      query.where(status.entryInserted.gt(newerThan));
    }

    if (order == ReadingOrder.asc) {
      query.orderBy(status.entryUpdated.asc(), status.id.asc());
    } else {
      query.orderBy(status.entryUpdated.desc(), status.id.desc());
    }

    query.offset(offset).limit(limit).setTimeout(config.getApplicationSettings().getQueryTimeout());
View Full Code Here

Examples of com.mysema.query.support.QueryMixin.orderBy()

        for (SQLTemplates templates : list) {
            QEmployee employee = QEmployee.employee;
            QueryMixin query = new QueryMixin();
            query.from(employee);
            query.orderBy(employee.firstname.asc());
            query.addProjection(employee.id);

            System.out.println(templates.getClass().getSimpleName());
            System.out.println();
View Full Code Here

Examples of javango.contrib.hibernate.annotations.ModelChoiceFieldProperties.orderby()

            if (f.nullCheck()) {
              qs = qs.filter(f.property(), null);
            }
          }
        }
        if (mcfp.orderby().length > 0) {
          qs = qs != null ? qs : managers.forClass(getModel()).all();
            qs = qs.orderBy(mcfp.orderby());
        }
       
        if (qs != null) setQuerySet(qs);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaQuery.orderBy()

    Path titleField = candidate.get("title");
    cq.where(cb.equal(titleField, "Bar Book"));

    Path isbnField = candidate.get("isbn");
    cq.orderBy(cb.desc(isbnField));

    Query q = em.createQuery(cq);
    List<Book> books = q.getResultList();
    assertNotNull(books);
    assertEquals(2, books.size());
View Full Code Here

Examples of javax.persistence.criteria.CriteriaQuery.orderBy()

            cq.where(whereState);
        } else {
            cq.where(cb.and(whereState, wherePerfomer));
        }

        cq.orderBy(cb.desc(z.get(Request_.id)));
        cq.select(z);

        return getEntityManager().createQuery(cq).getResultList();
    }       
   
View Full Code Here

Examples of javax.persistence.criteria.CriteriaQuery.orderBy()

        cq.where(cb.and(
                    cb.isNotNull(z.get(Request_.serviceObject)),
                    cb.equal(z.get(Request_.serviceObject), current.getServiceObject()))
                );
               
        cq.orderBy(cb.desc(z.get(Request_.id)));
        cq.select(z);

        return getEntityManager().createQuery(cq).getResultList();
    }
   
View Full Code Here

Examples of javax.persistence.criteria.CriteriaQuery.orderBy()

        } else {
            cq.where(cb.and(where, whereCreatedByOrg));    
        }
  
           
        cq.orderBy(cb.desc(z.get(Request_.id)));
        cq.select(z);

        return getEntityManager().createQuery(cq).getResultList();
    }
   
View Full Code Here

Examples of javax.persistence.criteria.CriteriaQuery.orderBy()

       
        CriteriaBuilder cb = getEntityManager().getCriteriaBuilder();
        CriteriaQuery cq = cb.createQuery();
        Root<UserHD> z = cq.from(UserHD.class);
        cq.where(cb.isNotNull(z.get(UserHD_.login))); // пустой логин - пользователь "выключен"
        cq.orderBy(cb.asc(z.get(UserHD_.id)));
        cq.select(z);
       
        return getEntityManager().createQuery(cq).getResultList();
       
    }
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.