Examples of Ordering


Examples of org.apache.cayenne.query.Ordering

    public List getStudentsByHouse() {
        SelectQuery query = new SelectQuery(Student.class);
        query.addPrefetch("studentHouse");

        // Add in-memory ordering
        Ordering ordering = new Ordering("studentHouse.name", true);
        List result = performQuery(query);
        ordering.orderList(result);
        return result;
    }
View Full Code Here

Examples of org.apache.cayenne.query.Ordering

    }

    public void testSort() throws Exception {
        prepareList(6);

        new Ordering(Artist.ARTIST_NAME_PROPERTY, SortOrder.DESCENDING).orderList(list);

        Iterator it = list.iterator();
        Artist previousArtist = null;
        while (it.hasNext()) {
            Artist artist = (Artist) it.next();
View Full Code Here

Examples of org.apache.cayenne.query.Ordering

        if (path != null && path.trim().length() == 0) {
            path = null;
        }
        boolean isDescending = "true".equalsIgnoreCase(descending);
        boolean isIgnoringCase = "true".equalsIgnoreCase(ignoreCase);
        orderings.add(new Ordering(path, !isDescending, isIgnoringCase));
    }
View Full Code Here

Examples of org.apache.cayenne.query.Ordering

    public void onRender() {
        super.onRender();

        if (getSchedulerService() != null) {
            List<JobAndSimpleTrigger> rowList = getSchedulerService().getJobAndTriggerList();
            Collections.sort(rowList, new Ordering("job.name", Ordering.ASC));
            table.setRowList(rowList);
        }
    }
View Full Code Here

Examples of org.apache.drill.common.logical.data.Order.Ordering

    List<Ordering> orderDefs = Lists.newArrayList();
    int i = 0;
    for (Ordering od : popConfig.getOrderings()) {
      SchemaPath sp = SchemaPath.getSimplePath("f" + i++);
      orderDefs.add(new Ordering(od.getDirection(), new FieldReference(sp)));
    }

    // sort the data incoming samples.
    SelectionVector4 newSv4 = containerBuilder.getSv4();
    Sorter sorter = SortBatch.createNewSorter(context, orderDefs, allSamplesContainer);
View Full Code Here

Examples of org.apache.flink.api.common.operators.Ordering

      }
     
      // some required local properties at step one and some more at step 2
      {
        GlobalProperties gp = new GlobalProperties();
        LocalProperties lp = LocalProperties.forOrdering(new Ordering(3, null, Order.ASCENDING).appendOrdering(1, null, Order.DESCENDING));
       
        RequestedLocalProperties reqLp1 = new RequestedLocalProperties();
        reqLp1.setGroupedFields(new FieldList(3, 1));
       
        RequestedLocalProperties reqLp2 = new RequestedLocalProperties();
        reqLp2.setOrdering(new Ordering(3, null, Order.ANY).appendOrdering(1, null, Order.ANY));
       
        toMap1.setRequiredGlobalProps(null);
        toMap1.setRequiredLocalProps(reqLp1);
       
        toMap2.setRequiredGlobalProps(null);
View Full Code Here

Examples of org.apache.jackrabbit.core.query.jsr283.qom.Ordering

    /**
     * Test case for {@link QueryObjectModelFactory#ascending(DynamicOperand)}
     */
    public void testOrderingAscending() throws RepositoryException {
        PropertyValue op = qomFactory.propertyValue(propertyName1);
        Ordering asc = qomFactory.ascending(op);
        assertEquals("Ordering.getOrder() must return QueryObjectModelConstants.ORDER_ASCENDING",
                QueryObjectModelConstants.ORDER_ASCENDING, asc.getOrder());
        assertTrue("Not a PropertyValue operand", asc.getOperand() instanceof PropertyValue);
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.query.jsr283.qom.Ordering

    // Page 157
    private Ordering[] parseOrder() throws RepositoryException {
        ArrayList orderList = new ArrayList();
        do {
            Ordering ordering;
            DynamicOperand op = parseDynamicOperand();
            if (readIf("DESC")) {
                ordering = factory.descending(op);
            } else {
                readIf("ASC");
View Full Code Here

Examples of org.apache.myfaces.config.element.Ordering

            }
        }

        for (FacesConfig resource : appConfigResources)
        {
            Ordering ordering = resource.getOrdering();
            if (ordering != null)
            {
                for (Iterator<OrderSlot> it =  resource.getOrdering().getBeforeList().iterator();it.hasNext();)
                {
                    OrderSlot slot = it.next();
View Full Code Here

Examples of org.apache.myfaces.config.impl.digester.elements.Ordering

            }
        }
       
        for (FacesConfig resource : appConfigResources)
        {
            Ordering ordering = resource.getOrdering();
            if (ordering != null)
            {
                for (Iterator<OrderSlot> it =  resource.getOrdering().getBeforeList().iterator();it.hasNext();)
                {
                    OrderSlot slot = it.next();
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.