Examples of FieldComparator


Examples of org.apache.lucene.search.FieldComparator

  private void buildSortedSet() {
    final Comparator<CollectedSearchGroup> comparator = new Comparator<CollectedSearchGroup>() {
      public int compare(CollectedSearchGroup o1, CollectedSearchGroup o2) {
        for (int compIDX = 0;; compIDX++) {
          FieldComparator fc = comparators[compIDX];
          final int c = reversed[compIDX] * fc.compare(o1.comparatorSlot, o2.comparatorSlot);
          if (c != 0) {
            return c;
          } else if (compIDX == compIDXEnd) {
            return o1.topDoc - o2.topDoc;
          }
        }
      }
    };

    orderedGroups = new TreeSet<CollectedSearchGroup>(comparator);
    orderedGroups.addAll(groupMap.values());
    assert orderedGroups.size() > 0;

    for (FieldComparator fc : comparators) {
      fc.setBottom(orderedGroups.last().comparatorSlot);
    }
  }
View Full Code Here

Examples of org.apache.lucene.search.FieldComparator

      for (SortField sortField : sortFields) {
        int type = sortField.getType();
        if (type == SortField.SCORE || type == SortField.DOC)
          continue;

        FieldComparator comparator = null;
        FieldComparator comparators[] = (readers == null) ? null : new FieldComparator[readers.length];

        String fieldname = sortField.getField();
        FieldType ft = fieldname == null ? null : req.getSchema().getFieldTypeNoEx(fieldname);

        DocSlice docList = (DocSlice)rb.getResults().docList;
View Full Code Here

Examples of org.zkoss.zul.FieldComparator

        list.add(new SampleBean(label + " " + rand.nextInt(count),
            rand.nextInt(count), cal.getTime()));
        cal.add(Calendar.DAY_OF_MONTH, 1);
      }
     
      return new GroupsModelArray(list, new FieldComparator("name", true)) {
        protected Object createGroupHead(
            Object[] groupdata, int index, int col) {
          return new Object[] { groupdata[0], new Integer(col) };
        }
      };
View Full Code Here

Examples of org.zkoss.zul.FieldComparator

    paging_OfficeList.setPageSize(getCountRows());
    paging_OfficeList.setDetailed(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_OfficeList_No.setSortAscending(new FieldComparator("filNr", true));
    listheader_OfficeList_No.setSortDescending(new FieldComparator("filNr", false));
    listheader_OfficeList_Name1.setSortAscending(new FieldComparator("filName1", true));
    listheader_OfficeList_Name1.setSortDescending(new FieldComparator("filName1", false));
    listheader_OfficeList_Name2.setSortAscending(new FieldComparator("filName2", true));
    listheader_OfficeList_Name2.setSortDescending(new FieldComparator("filName2", false));
    listheader_OfficeList_City.setSortAscending(new FieldComparator("filOrt", true));
    listheader_OfficeList_City.setSortDescending(new FieldComparator("filOrt", false));

    // ++ create the searchObject and init sorting ++//
    // ++ create the searchObject and init sorting ++//
    searchObj = new HibernateSearchObject<Office>(Office.class, getCountRows());
    searchObj.addSort("filName1", false);
View Full Code Here

Examples of org.zkoss.zul.FieldComparator

    borderLayout_Users.setHeight(String.valueOf(maxListBoxHeight - 5) + "px");
    borderLayout_Roles.setHeight(String.valueOf(maxListBoxHeight - 5) + "px");

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_SecUserRole_usrLoginname.setSortAscending(new FieldComparator("usrLoginname", true));
    listheader_SecUserRole_usrLoginname.setSortDescending(new FieldComparator("usrLoginname", false));

    // Assign the Comparator for sorting listbox secUserRolesList
    listheader_SecUserRole_RoleName.setSortAscending(new FieldComparator("rolShortdescription", true));
    listheader_SecUserRole_RoleName.setSortDescending(new FieldComparator("rolShortdescription", false));

    /* set the PageSize */
    paging_ListBoxSecUser.setPageSize(getCountRowsSecUser());
    paging_ListBoxSecUser.setDetailed(true);

 
View Full Code Here

Examples of org.zkoss.zul.FieldComparator

    borderLayout_secUserList.setHeight(String.valueOf(maxListBoxHeight) + "px");

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_UserList_usrLoginname.setSortAscending(new FieldComparator("usrLoginname", true));
    listheader_UserList_usrLoginname.setSortDescending(new FieldComparator("usrLoginname", false));
    listheader_UserList_usrLoginname.setSortDirection("ascending");
    listheader_UserList_usrLastname.setSortAscending(new FieldComparator("usrLastname", true));
    listheader_UserList_usrLastname.setSortDescending(new FieldComparator("usrLastname", false));
    listheader_UserList_usrEmail.setSortAscending(new FieldComparator("usrEmail", true));
    listheader_UserList_usrEmail.setSortDescending(new FieldComparator("usrEmail", false));
    listheader_UserList_usrEnabled.setSortAscending(new FieldComparator("usrEnabled", true));
    listheader_UserList_usrEnabled.setSortDescending(new FieldComparator("usrEnabled", false));
    listheader_UserList_usrAccountnonexpired.setSortAscending(new FieldComparator("usrAccountnonexpired", true));
    listheader_UserList_usrAccountnonexpired.setSortDescending(new FieldComparator("usrAccountnonexpired", false));
    listheader_UserList_usrCredentialsnonexpired.setSortAscending(new FieldComparator("usrCredentialsnonexpired", true));
    listheader_UserList_usrCredentialsnonexpired.setSortDescending(new FieldComparator("usrCredentialsnonexpired", false));
    listheader_UserList_usrAccountnonlocked.setSortAscending(new FieldComparator("usrAccountnonlocked", true));
    listheader_UserList_usrAccountnonlocked.setSortDescending(new FieldComparator("usrAccountnonlocked", false));

    // set the paging params
    paging_UserList.setPageSize(getCountRows());
    paging_UserList.setDetailed(true);
View Full Code Here

Examples of org.zkoss.zul.FieldComparator

    // init, show all rights
    checkbox_SecRightList_ShowAll.setChecked(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_SecRightList_rigName.setSortAscending(new FieldComparator("rigName", true));
    listheader_SecRightList_rigName.setSortDescending(new FieldComparator("rigName", false));
    listheader_SecRightList_rigType.setSortAscending(new FieldComparator("rigType", true));
    listheader_SecRightList_rigType.setSortDescending(new FieldComparator("rigType", false));

    // ++++++++++++++ DropDown ListBox ++++++++++++++++++ //
    // set listModel and itemRenderer for the dropdown listbox
    lb_secRight_RightType.setModel(new ListModelList(getSecurityService().getAllTypes()));
    lb_secRight_RightType.setItemRenderer(new SecRightSecTypListModelItemRenderer());
View Full Code Here

Examples of org.zkoss.zul.FieldComparator

    pagingBranchList.setPageSize(getCountRows());
    pagingBranchList.setDetailed(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_BranchText.setSortAscending(new FieldComparator("braBezeichnung", true));
    listheader_BranchText.setSortDescending(new FieldComparator("braBezeichnung", false));

    // ++ create the searchObject and init sorting ++//
    // get customers and only their latest address
    searchObj = new HibernateSearchObject<Branche>(Branche.class, getCountRows());
    searchObj.addSort("braBezeichnung", false);
View Full Code Here

Examples of org.zkoss.zul.FieldComparator

    // secRolegroupWindow.setHeight((height - topHeader) + "px");

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    // Assign the Comparator for sorting listBoxSecRole
    listheader_SecRoleGroup_Rolename.setSortAscending(new FieldComparator("rolShortdescription", true));
    listheader_SecRoleGroup_Rolename.setSortDescending(new FieldComparator("rolShortdescription", false));

    // Assign the Comparator for sorting listBoxRoleGroups
    listheader_SecRoleGroup_GroupName.setSortAscending(new FieldComparator("grpShortdescription", true));
    listheader_SecRoleGroup_GroupName.setSortDescending(new FieldComparator("grpShortdescription", false));

    /* set the PageSize */
    paging_ListBoxSecRole.setPageSize(getCountRowsSecRole());
    paging_ListBoxSecRole.setDetailed(true);

 
View Full Code Here

Examples of org.zkoss.zul.FieldComparator

    // init, show all rights
    checkbox_SecGroupList_ShowAll.setChecked(true);

    // not used listheaders must be declared like ->
    // lh.setSortAscending(""); lh.setSortDescending("")
    listheader_SecGroupList_grpShortdescription.setSortAscending(new FieldComparator("grpShortdescription", true));
    listheader_SecGroupList_grpShortdescription.setSortDescending(new FieldComparator("grpShortdescription", false));
    listheader_SecGroupList_grpLongdescription.setSortAscending("");
    listheader_SecGroupList_grpLongdescription.setSortDescending("");

    // ++ create the searchObject and init sorting ++//
    HibernateSearchObject<SecGroup> soSecGroup = new HibernateSearchObject<SecGroup>(SecGroup.class, getCountRows());
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.