Examples of Sorting


Examples of com.tll.dao.Sorting

   
    for(final SelectNamedQueries nq : SelectNamedQueries.values()) {
      final IListingDataProvider<IEntity> dataProvider = getListHandlerDataProvider((Class<IEntity>) nq.getEntityType());
      final CriteriaAndSorting cas = createCriteriaAndSorting(nq);
      final Criteria<IEntity> criteria = cas.criteria;
      final Sorting sorting = cas.sorting;

      // test for all list handler types
      for(final ListHandlerType lht : ListHandlerType.values()) {
        IListHandler<SearchResult> listHandler = null;
        logger.debug("Validating '" + nq.toString() + "' query with " + lht.toString() + " list handling...");
View Full Code Here

Examples of com.tll.dao.Sorting

  public final void onListingEvent(ListingEvent<R> event) {
    if(event.getListingOp().isQuery()) {
      removeBodyRows();
      if(event.getPageElements() != null) {
        addBodyRows(event.getPageElements(), event.getOffset());
        final Sorting sorting = event.getSorting();
        if(sortlinks != null && sorting != null) applySorting(sorting);
        crntPage = event.getPageNum() + 1;
        numPages = event.getNumPages();
        actvRowIndex = crntRowIndex = -1; // reset
      }
View Full Code Here

Examples of com.tll.dao.Sorting

      if(event.getSource() == lnk) {
        final SortColumn sc =
          new SortColumn(column.getPropertyName(), column.getParentAlias(), direction == SortDir.ASC ? SortDir.DESC
              : SortDir.ASC,
              ignoreCaseWhenSorting);
        listingOperator.sort(new Sorting(sc));
      }
    }
View Full Code Here

Examples of com.tll.dao.Sorting

    assert elements != null && elements.size() > 0 : "No elements exist - test can't run";
    assert elements.size() >= 10 : "At least 10 list elements must be present for this test";
    final int pageSize = 3;

    final Criteria<Address> criteria = new Criteria<Address>(Address.class);
    final Sorting sorting = new Sorting(new SortColumn("emailAddress"));
    final IListHandler<SearchResult<?>> listHandler =
      ListHandlerFactory.create(criteria, sorting, ListHandlerType.PAGE, dataProvider);

    List<SearchResult<?>> list;
View Full Code Here

Examples of com.tll.dao.Sorting

  public final void onListingEvent(ListingEvent<R> event) {
    if(event.getListingOp().isQuery()) {
      removeBodyRows();
      if(event.getPageElements() != null) {
        addBodyRows(event.getPageElements(), event.getOffset());
        final Sorting sorting = event.getSorting();
        if(sortlinks != null && sorting != null) applySorting(sorting);
        crntPage = event.getPageNum() + 1;
        numPages = event.getNumPages();
        actvRowIndex = crntRowIndex = -1; // reset
      }
View Full Code Here

Examples of com.tll.dao.Sorting

    public void onClick(ClickEvent event) {
      event.stopPropagation();
      final SortColumn sc =
          new SortColumn(column.getPropertyName(), column.getParentAlias(), direction == SortDir.ASC ? SortDir.DESC
              : SortDir.ASC, column.isIgnoreCase()? Boolean.TRUE : Boolean.FALSE);
      listingOperator.sort(new Sorting(sc));
    }
View Full Code Here

Examples of com.tll.dao.Sorting

    final IListingDataProvider dataProvider = accountService.getAccountHistoryDataProvider();

    final Criteria<AccountHistory> criteria = new Criteria<AccountHistory>(AccountHistory.class);
    criteria.getPrimaryGroup().addCriterion("account", new PrimaryKey<Account>(Account.class, account.getId()));

    final Sorting sorting = new Sorting("transDate");

    final IListHandler<SearchResult<?>> lh =
      ListHandlerFactory.create(criteria, sorting, ListHandlerType.PAGE, dataProvider);
    final List<SearchResult<?>> chunk = lh.getElements(0, 25, sorting);
    Assert.assertTrue(chunk != null && chunk.size() == 1);
View Full Code Here

Examples of com.tll.dao.Sorting

    // iterator through all defined select named queries
    for(final SelectNamedQueries nq : querySortBindings.keySet()) {
      dataProvider = getListHandlerDataProvider((Class<IEntity>) nq.getEntityType());
      criteria = new Criteria<IEntity>(nq, queryParamsBindings.get(nq));
      final Sorting sorting = new Sorting(querySortBindings.get(nq));

      // test for all list handler types
      for(final ListHandlerType lht : ListHandlerType.values()) {
        IListHandler<SearchResult<?>> listHandler = null;
        logger.debug("Validating '" + nq.toString() + "' query with " + lht.toString() + " list handling...");
View Full Code Here

Examples of com.tll.dao.Sorting

    this.rpcHandler = new RpcUiHandler(this);
    this.auxDataRequest = auxDataRequest;
    this.fldPnlResolver = fldPnlResolver;
    this.deletable = deletable;
    final String listingId = SmbizEntityType.INTERFACE.name();
    final Sorting defaultSorting = new Sorting("name");
    final String[] propKeys = {
      "name", "code", "description"
    };
    listHandler =
      RemoteListingOperator.create(listingId, ListHandlerType.COLLECTION, criteria, propKeys, -1, defaultSorting);
View Full Code Here

Examples of com.tll.dao.Sorting

   * @return A new {@link RemoteListingDefinition} instance.
   */
  RemoteListingDefinition<TestAddressSearch> getListingDef() {
    final RemoteListingDefinition<TestAddressSearch> def =
      new RemoteListingDefinition<TestAddressSearch>(new TestAddressSearch(), null, 2,
          new Sorting("lastName"));
    return def;
  }
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.