Examples of SortCriterion


Examples of com.anasoft.os.daofusion.criteria.SortCriterion

   */
  private SortCriterion getSortCriterion(FilterAndSortCriteria clientSideCriteria) {
    boolean sortAscending = clientSideCriteria.getSortAscending() != null ? clientSideCriteria.getSortAscending().booleanValue() : false;
    boolean ignoreCase = clientSideCriteria.getIgnoreCase() != null ? clientSideCriteria.getIgnoreCase().booleanValue() : false;
   
    return new SortCriterion(getAssociationPath(),
        getTargetPropertyName(),
        sortAscending,
        ignoreCase);
  }
View Full Code Here

Examples of de.danet.an.workflow.api.query.SortCriterion

            logger.debug ("Retrieving process list");
            processSorter.clearModified();
            ProcessDirectory pd = null;
            try {
                pd = wsc.getWorkflowService().processDirectory();
                SortCriterion sortCriterion = null;
                SortCriterion lastSortCriterion = null;
                for (Iterator i = processSorter.getSortCriteria().iterator();
                     i.hasNext();) {
                    BeanSorter.SortCriterion bsc
                        = (BeanSorter.SortCriterion)i.next();
                    SortCriterion sc = null;
                    if (bsc.isAscending()) {
                        sc = new AscendingOrder(bsc.getProperty());
                    } else {
                        sc = new DescendingOrder(bsc.getProperty());
                    }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.SortCriterion

         String[] tokens = COMMA.split(sql.trim());
         List<SortCriterion> criteria = new ArrayList<SortCriterion>(tokens.length);
         for (int i = 0; i != tokens.length; i++)
         {
            String[] terms = SPACE.split(tokens[i].trim());
            SortCriterion sortCriterion = new SortCriterion(terms[0], terms.length == 1 ? false : "ASC".equalsIgnoreCase(terms[1]));
            criteria.add(i, sortCriterion);
         }
         return criteria;
      }
      return new ArrayList<SortCriterion>();
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.SortCriterion

                assert artists instanceof CollectionModel;
                CollectionModel collectionModel = (CollectionModel) artists;
               
                // Reorder the list              
                List<SortCriterion> criteria = new ArrayList<SortCriterion>();
                criteria.add(new SortCriterion("artist.name", true));
                collectionModel.setSortCriteria(criteria);
               
                // Check for correct ordering
                assertArtist(collectionModel, 5, ARTIST5_NAME);
                assertArtist(collectionModel, 4, ARTIST6_NAME);
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.SortCriterion

    Map<String, String> parameters)
  {
    String property = parameters.get(XhtmlConstants.VALUE_PARAM);
    Object state = parameters.get(XhtmlConstants.STATE_PARAM);
    boolean sortOrder = !XhtmlConstants.SORTABLE_ASCENDING.equals(state);
    SortCriterion criterion = new SortCriterion(property, sortOrder);

    SortEvent event =
      new SortEvent(table, Collections.singletonList(criterion));
    event.queue();
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.SortCriterion

    UIXCollection table = (UIXCollection) tContext.getTable();
    List<SortCriterion> criteria = table.getSortCriteria();
    // We currently only show anything for the primary sort criterion
    if (criteria.size() > 0)
    {
      SortCriterion criterion = criteria.get(0);
      if (property.equals(criterion.getProperty()))
      {
        return criterion.isAscending() ? SORT_ASCENDING : SORT_DESCENDING;
      }
    }

    return table.isSortable(property) ? SORT_SORTABLE : SORT_NO;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.SortCriterion

    UIXCollection table = (UIXCollection) tContext.getTable();
    List<SortCriterion> criteria = table.getSortCriteria();
    // We currently only show anything for the primary sort criterion
    if (criteria.size() > 0)
    {
      SortCriterion criterion = criteria.get(0);
      if (property.equals(criterion.getProperty()))
      {
        return criterion.isAscending() ? SORT_ASCENDING : SORT_DESCENDING;
      }
    }

    return table.isSortable(property) ? SORT_SORTABLE : SORT_NO;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.SortCriterion

    Map<String, String> parameters)
  {
    String property = parameters.get(XhtmlConstants.VALUE_PARAM);
    Object state = parameters.get(XhtmlConstants.STATE_PARAM);
    boolean sortOrder = !XhtmlConstants.SORTABLE_ASCENDING.equals(state);
    SortCriterion criterion = new SortCriterion(property, sortOrder);

    SortEvent event =
      new SortEvent(table, Collections.singletonList(criterion));
    event.queue();
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.SortCriterion

    UIXCollection table = (UIXCollection) tContext.getTable();
    List<SortCriterion> criteria = table.getSortCriteria();
    // We currently only show anything for the primary sort criterion
    if (criteria.size() > 0)
    {
      SortCriterion criterion = criteria.get(0);
      if (property.equals(criterion.getProperty()))
      {
        return criterion.isAscending() ? SORT_ASCENDING : SORT_DESCENDING;
      }
    }

    return table.isSortable(property) ? SORT_SORTABLE : SORT_NO;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.SortCriterion

    Map<String, String> parameters)
  {
    String property = parameters.get(TrinidadRenderingConstants.VALUE_PARAM);
    Object state = parameters.get(TrinidadRenderingConstants.STATE_PARAM);
    boolean sortOrder = !TrinidadRenderingConstants.SORTABLE_ASCENDING.equals(state);
    SortCriterion criterion = new SortCriterion(property, sortOrder);

    SortEvent event =
      new SortEvent(table, Collections.singletonList(criterion));
    event.queue();
  }
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.