Package com.trg.search

Examples of com.trg.search.Filter


      if (getBranchListCtrl().getBinder() != null) {

        // ++ create a searchObject and init sorting ++//
        final HibernateSearchObject<Branche> searchObjBranch = new HibernateSearchObject<Branche>(Branche.class, getBranchListCtrl().getCountRows());
        searchObjBranch.addFilter(new Filter("braBezeichnung", "%" + this.tb_Branch_Name.getValue() + "%", Filter.OP_ILIKE));
        searchObjBranch.addSort("braBezeichnung", false);

        // Change the BindingListModel.
        getBranchListCtrl().getPagedBindingListWrapper().setSearchObject(searchObjBranch);
View Full Code Here


    } else {
      // show only logged in users data
      String userName = SecurityContextHolder.getContext().getAuthentication().getName();

      soUser.addFilter(new Filter("usrLoginname", userName, Filter.OP_EQUAL));

      // Set the ListModel.
      getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
    }
    // set the itemRenderer
View Full Code Here

      checkbox_UserList_ShowAll.setChecked(false);
      tb_SecUser_Lastname.setValue("");
      tb_SecUser_Email.setValue("");

      HibernateSearchObject<SecUser> soUser = new HibernateSearchObject<SecUser>(SecUser.class, getCountRows());
      soUser.addFilter(new Filter("usrLoginname", "%" + tb_SecUser_Loginname.getValue() + "%", Filter.OP_ILIKE));
      soUser.addSort("usrLoginname", false);

      /*
       * New check the rights. If UserOnly mode than show only the users
       * data
       */
      final UserWorkspace workspace = getUserWorkspace();

      // special right for see all other users
      if (workspace.isAllowed("data_SeeAllUserData")) {
        // show all users
        // Set the ListModel.
        getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
      } else {
        // show only logged in users data
        String userName = SecurityContextHolder.getContext().getAuthentication().getName();

        soUser.addFilter(new Filter("usrLoginname", userName, Filter.OP_EQUAL));

        // Set the ListModel.
        getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
      }
    }
View Full Code Here

      checkbox_UserList_ShowAll.setChecked(false);
      tb_SecUser_Loginname.setValue("");
      tb_SecUser_Email.setValue("");

      HibernateSearchObject<SecUser> soUser = new HibernateSearchObject<SecUser>(SecUser.class, getCountRows());
      soUser.addFilter(new Filter("usrLastname", "%" + tb_SecUser_Lastname.getValue() + "%", Filter.OP_ILIKE));
      soUser.addSort("usrLoginname", false);

      /*
       * New check the rights. If UserOnly mode than show only the users
       * data
       */
      final UserWorkspace workspace = getUserWorkspace();

      // special right for see all other users
      if (workspace.isAllowed("data_SeeAllUserData")) {
        // show all users

        // Set the ListModel.
        getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
      } else {
        // show only logged in users data
        String userName = SecurityContextHolder.getContext().getAuthentication().getName();

        soUser.addFilter(new Filter("usrLoginname", userName, Filter.OP_EQUAL));

        // Set the ListModel.
        getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
      }
    }
View Full Code Here

      checkbox_UserList_ShowAll.setChecked(false);
      tb_SecUser_Loginname.setValue("");
      tb_SecUser_Lastname.setValue("");

      HibernateSearchObject<SecUser> soUser = new HibernateSearchObject<SecUser>(SecUser.class, getCountRows());
      soUser.addFilter(new Filter("usrEmail", "%" + tb_SecUser_Email.getValue() + "%", Filter.OP_ILIKE));
      soUser.addSort("usrLoginname", false);

      /*
       * New check the rights. If UserOnly mode than show only the users
       * data
       */
      final UserWorkspace workspace = getUserWorkspace();

      // special right for see all other users
      if (workspace.isAllowed("data_SeeAllUserData")) {
        // show all users

        // Set the ListModel.
        getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
      } else {
        // show only logged in users data
        String userName = SecurityContextHolder.getContext().getAuthentication().getName();

        soUser.addFilter(new Filter("usrLoginname", userName, Filter.OP_EQUAL));

        // Set the ListModel.
        getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
      }
    }
View Full Code Here

      getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
    } else {
      // show only logged in users data
      String userName = SecurityContextHolder.getContext().getAuthentication().getName();

      soUser.addFilter(new Filter("usrLoginname", userName, Filter.OP_EQUAL));

      // Set the ListModel.
      getPagedListWrapper().init(soUser, listBoxUser, paging_UserList);
    }
  }
View Full Code Here

      // ++ create the searchObject and init sorting ++//
      final HibernateSearchObject<SecRight> soSecRight = new HibernateSearchObject<SecRight>(SecRight.class, getCountRows());
      soSecRight.addSort("rigName", false);

      soSecRight.addFilter(new Filter("rigName", "%" + tb_SecRightList_rigName.getValue() + "%", Filter.OP_ILIKE));

      // check if we must include a selected RightType item
      Listitem item = lb_secRight_RightType.getSelectedItem();

      if (item != null) {

        // casting to the needed object
        SecTyp type = (SecTyp) item.getAttribute("data");

        if (type.getStpId() > -1) {
          soSecRight.addFilter(new Filter("rigType", type.getStpId(), Filter.OP_EQUAL));
        }

        // Set the ListModel.
        getPagedListWrapper().init(soSecRight, listBoxSecRights, paging_SecRightList);
View Full Code Here

      if (type.getStpId() > -1) {

        soSecRight = new HibernateSearchObject<SecRight>(SecRight.class, getCountRows());
        soSecRight.addSort("rigName", false);

        soSecRight.addFilter(new Filter("rigType", type.getStpId(), Filter.OP_EQUAL));

        if (!tb_SecRightList_rigName.getValue().isEmpty()) {

          // mixed search statement -> like RightName + RightType
          soSecRight.addFilter(new Filter("rigName", "%" + tb_SecRightList_rigName.getValue() + "%", Filter.OP_ILIKE));
        }
        // Set the ListModel.
        getPagedListWrapper().init(soSecRight, listBoxSecRights, paging_SecRightList);
      }
View Full Code Here

      txtb_Office_Name.setValue(""); // clear
      txtb_Office_City.setValue(""); // clear

      // ++ create the searchObject and init sorting ++//
      HibernateSearchObject<Office> soOffice = new HibernateSearchObject<Office>(Office.class, getOfficeListCtrl().getCountRows());
      soOffice.addFilter(new Filter("filNr", "%" + txtb_Office_No.getValue() + "%", Filter.OP_ILIKE));
      soOffice.addSort("filNr", false);

      // Change the BindingListModel.
      if (getOfficeListCtrl().getBinder() != null) {
        getOfficeListCtrl().getPagedBindingListWrapper().setSearchObject(soOffice);
View Full Code Here

      txtb_Office_City.setValue(""); // clear
      txtb_Office_No.setValue(""); // clear

      // ++ create the searchObject and init sorting ++//
      HibernateSearchObject<Office> soOffice = new HibernateSearchObject<Office>(Office.class, getOfficeListCtrl().getCountRows());
      soOffice.addFilter(new Filter("filName1", "%" + txtb_Office_Name.getValue() + "%", Filter.OP_ILIKE));
      soOffice.addSort("filName1", false);

      // Change the BindingListModel.
      if (getOfficeListCtrl().getBinder() != null) {
        getOfficeListCtrl().getPagedBindingListWrapper().setSearchObject(soOffice);
View Full Code Here

TOP

Related Classes of com.trg.search.Filter

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.