Package com.tll.dao

Examples of com.tll.dao.SortColumn


    throw new IllegalArgumentException("Unresolveable column property: " + colProp);
  }

  private void applySorting(Sorting sorting) {
    assert sortlinks != null && sorting != null;
    final SortColumn sc = sorting.getPrimarySortColumn();

    // resolve the column index
    final int index = resolveColumnIndex(sc.getPropertyName());

    // reset old sort column (if there is one)
    if(crntSortColIndex >= 0) {
      sortlinks[crntSortColIndex].clearSortDirection();
    }

    // set new sort column
    sortlinks[index].setSortDirection(sc.getDirection());
    crntSortColIndex = index;
  }
View Full Code Here


      pnl.remove(0);
    }

    public void onClick(ClickEvent event) {
      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

    assert elements.size() >= 10 : "At least 10 list elements must be present for this test";
    final int pageSize = 3;

    final IListingDataProvider<Address> dataProvider = getTestEntityService();
    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

      final QueryParam qp = new QueryParam("ispId", PropertyType.STRING, anIsp.getId());
      list.add(qp);
      break;
    }
    case CUSTOMER_LISTING: {
      sorting = new Sorting(new SortColumn("dateCreated", "c"));

      // get the asp (to serve as the parent account)..
      final Asp asp = getEntityDao().loadAll(Asp.class).get(0);
      final QueryParam qp = new QueryParam("accountId", PropertyType.STRING, asp.getId());
      list.add(qp);
      break;
    }
    case INTERFACE_SUMMARY_LISTING:
      sorting = new Sorting(new SortColumn("code", "intf"));
      break;
    case ACCOUNT_INTERFACE_SUMMARY_LISTING: {
      sorting = new Sorting(new SortColumn("code", "intf"));

      list.add(new QueryParam("", PropertyType.STRING, "asp"));
      break;
    }
View Full Code Here

    throw new IllegalArgumentException("Unresolveable column property: " + colProp);
  }

  private void applySorting(Sorting sorting) {
    assert sortlinks != null && sorting != null;
    final SortColumn sc = sorting.getPrimarySortColumn();

    // resolve the column index
    final int index = resolveColumnIndex(sc.getPropertyName());

    // reset old sort column (if there is one)
    if(crntSortColIndex >= 0) {
      sortlinks[crntSortColIndex].clearSortDirection();
    }

    // set new sort column
    sortlinks[index].setSortDirection(sc.getDirection());
    crntSortColIndex = index;
  }
View Full Code Here

      pnl.remove(0);
    }

    public void onClick(ClickEvent event) {
      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

    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

    throw new IllegalArgumentException("Unresolveable column property: " + colProp);
  }

  private void applySorting(Sorting sorting) {
    assert sortlinks != null && sorting != null;
    final SortColumn sc = sorting.getPrimarySortColumn();

    // resolve the column index
    final int index = resolveColumnIndex(sc.getPropertyName());

    // reset old sort column (if there is one)
    if(crntSortColIndex >= 0) {
      sortlinks[crntSortColIndex].clearSortDirection();
    }

    // ensure this is a sortable column
    SortLink sl = sortlinks[index];
    if(sl == null) {
      crntSortColIndex = -1;
      return;
    }
   
    // set new sort column
    sl.setSortDirection(sc.getDirection());
    crntSortColIndex = index;
  }
View Full Code Here

    }

    @Override
    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

TOP

Related Classes of com.tll.dao.SortColumn

Copyright © 2018 www.massapicom. 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.