Package com.trg.search

Examples of com.trg.search.Filter


      // deeper loading of the relations to prevent the lazy
      // loading problem.
      soSecLoginlog.addFetch("ip2Country.countryCode");
      soSecLoginlog.addSort("lglLogtime", true);

      soSecLoginlog.addFilter(new Filter("lglLoginname", this.tb_SecUserlog_LoginName.getValue(), Filter.OP_EQUAL));

      // Set the ListModel
      getPagedListWrapper().init(soSecLoginlog, this.listBoxSecUserlog, this.paging_SecUserLogList);
    }
View Full Code Here


        // deeper loading of the relations to prevent the lazy
        // loading problem.
        soSecLoginlog.addFetch("ip2Country.countryCode");
        soSecLoginlog.addSort("lglLogtime", true);

        soSecLoginlog.addFilter(new Filter("lglLogtime", dateFrom, Filter.OP_GREATER_OR_EQUAL));
        soSecLoginlog.addFilter(new Filter("lglLogtime", dateTo, Filter.OP_LESS_OR_EQUAL));

        // Set the ListModel
        getPagedListWrapper().init(soSecLoginlog, this.listBoxSecUserlog, this.paging_SecUserLogList);

        this.checkbox_SecLoginlogList_ShowAll.setChecked(false);
View Full Code Here

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunNr", "%" + kunNr.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunNr", kunNr.getValue(), searchOpId));
        }
      }
    }

    if (StringUtils.isNotEmpty(kunMatchcode.getValue())) {

      // get the search operator
      Listitem item = sortOperator_kunMatchcode.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunMatchcode", "%" + kunMatchcode.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunMatchcode", kunMatchcode.getValue(), searchOpId));
        }
      }
    }

    if (StringUtils.isNotEmpty(kunName1.getValue())) {

      // get the search operator
      Listitem item = sortOperator_kunName1.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunName1", "%" + kunName1.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunName1", kunName1.getValue(), searchOpId));
        }
      }
    }

    if (StringUtils.isNotEmpty(this.kunName2.getValue())) {

      // get the search operator
      Listitem item = sortOperator_kunName2.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunName2", "%" + kunName2.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunName2", kunName2.getValue(), searchOpId));
        }
      }
    }

    if (StringUtils.isNotEmpty(this.kunOrt.getValue())) {

      // get the search operator
      Listitem item = sortOperator_kunOrt.getSelectedItem();

      if (item != null) {
        int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

        if (searchOpId == Filter.OP_ILIKE) {
          so.addFilter(new Filter("kunOrt", "%" + kunOrt.getValue().toUpperCase() + "%", searchOpId));
        } else if (searchOpId == -1) {
          // do nothing
        } else {
          so.addFilter(new Filter("kunOrt", kunOrt.getValue(), searchOpId));
        }
      }
    }

    if (this.kunBranche.getSelectedCount() > 0) {

      // check if it the default empty item
      Listitem itemB = kunBranche.getSelectedItem();
      Branche branche = (Branche) itemB.getAttribute("data");

      if (!StringUtils.isEmpty(branche.getBraBezeichnung())) {

        // get the search operator
        Listitem item = this.sortOperator_kunBranch.getSelectedItem();

        if (item != null) {
          int searchOpId = ((SearchOperators) item.getAttribute("data")).getSearchOperatorId();

          if (searchOpId == Filter.OP_ILIKE) {
            so.addFilter(new Filter("branche", branche, searchOpId));
          } else if (searchOpId == -1) {
            // do nothing
          } else {
            so.addFilter(new Filter("branche", branche, searchOpId));
          }
        }
      }
    }
View Full Code Here

    // Set the ListModel for the orderPositions.
    if (getOrder() != null) {
      if (!getOrder().isNew()) {
        HibernateSearchObject<Orderposition> soOrderPosition = new HibernateSearchObject<Orderposition>(Orderposition.class, pageSizeOrderPosition);
        soOrderPosition.addFilter(new Filter("order", getOrder(), Filter.OP_EQUAL));
        // deeper loading of the relation to prevent the lazy
        // loading problem.
        soOrderPosition.addFetch("article");

        // Set the ListModel.
View Full Code Here

    // ++ create the searchObject and init sorting ++//
    HibernateSearchObject<Customer> soCustomer = new HibernateSearchObject<Customer>(Customer.class);

    if (StringUtils.isNotEmpty(tb_Orders_SearchCustNo.getValue())) {
      soCustomer.addFilter(new Filter("kunNr", tb_Orders_SearchCustNo.getValue(), Filter.OP_EQUAL));
    }
    if (StringUtils.isNotEmpty(tb_Orders_CustSearchMatchcode.getValue())) {
      soCustomer.addFilter(new Filter("kunMatchcode", "%" + tb_Orders_CustSearchMatchcode.getValue() + "%", Filter.OP_ILIKE));
    }
    if (StringUtils.isNotEmpty(tb_Orders_SearchCustName1.getValue())) {
      soCustomer.addFilter(new Filter("kunName1", "%" + tb_Orders_SearchCustName1.getValue() + "%", Filter.OP_ILIKE));
    }
    if (StringUtils.isNotEmpty(tb_Orders_SearchCustCity.getValue())) {
      soCustomer.addFilter(new Filter("kunOrt", "%" + tb_Orders_SearchCustCity.getValue() + "%", Filter.OP_ILIKE));
    }
    soCustomer.addSort("kunName1", false);

    // set the paging params
    paging_OrderDialog_CustomerSearchList.setPageSize(pageSizeSearchCustomer);
View Full Code Here

    }

    /** Synchronize the listbox in the OrderDialog */

    HibernateSearchObject<Orderposition> soOrderPosition = new HibernateSearchObject<Orderposition>(Orderposition.class, orderDialogCtrl.getPageSizeOrderPosition());
    soOrderPosition.addFilter(new Filter("order", getOrder(), Filter.OP_EQUAL));
    // deeper loading of a relation to prevent the lazy
    // loading problem.
    soOrderPosition.addFetch("article");

    // Set the ListModel.
View Full Code Here

    // only in sample app init with all orders
    HibernateSearchObject<Article> soArticle = new HibernateSearchObject<Article>(Article.class, getPageSizeArticleSearch());
    soArticle.addSort("artNr", false);

    if (StringUtils.isNotEmpty(tb_OrderPosition_SearchArticlelNo.getValue())) {
      soArticle.addFilter(new Filter("artNr", "%" + tb_OrderPosition_SearchArticlelNo.getValue() + "%", Filter.OP_ILIKE));
    }

    if (StringUtils.isNotEmpty(tb_OrderPosition_SearchArticleDesc.getValue())) {
      soArticle.addFilter(new Filter("artKurzbezeichnung", "%" + tb_OrderPosition_SearchArticleDesc.getValue() + "%", Filter.OP_ILIKE));
    }

    // Set the ListModel.
    getPlwArticles().init(soArticle, listBoxArticleSearch, paging_ListBoxArticleSearch);
View Full Code Here

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

        // ++ create a searchObject and init sorting ++//
        final HibernateSearchObject<Article> so = new HibernateSearchObject<Article>(Article.class, getArticleListCtrl().getCountRows());
        so.addFilter(new Filter("artNr", "%" + tb_Article_ArticleID.getValue() + "%", Filter.OP_ILIKE));
        so.addSort("artNr", false);

        // Change the BindingListModel.
        getArticleListCtrl().getPagedBindingListWrapper().setSearchObject(so);
View Full Code Here

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

        // ++ create a searchObject and init sorting ++//
        final HibernateSearchObject<Article> so = new HibernateSearchObject<Article>(Article.class, getArticleListCtrl().getCountRows());
        so.addFilter(new Filter("artKurzbezeichnung", "%" + tb_Article_Name.getValue() + "%", Filter.OP_ILIKE));
        so.addSort("artKurzbezeichnung", false);

        // Change the BindingListModel.
        getArticleListCtrl().getPagedBindingListWrapper().setSearchObject(so);
View Full Code Here

    // Check if the is a customer bean and
    // check too if it's new.
    if (customer == null) {
      getPlwOrders().init(soOrder, listBoxOrder, paging_OrderList);
    } else if (!customer.isNew()) {
      soOrder.addFilter(new Filter("customer", customer, Filter.OP_EQUAL));
      getPlwOrders().init(soOrder, listBoxOrder, paging_OrderList);
    } else if (customer.isNew()) {
      return;
    }

    listBoxOrder.setItemRenderer(new OrderListModelItemRenderer());

    listBoxOrderArticle.setItemRenderer(new OrderpositionListModelItemRenderer());

    // init the first entry
    ListModelList lml = (ListModelList) listBoxOrder.getModel();

    // Now we would show the corresponding detail list of the first
    // selected entry of the MASTER Table
    // We became not the first item FROM the list because it's not
    // rendered at this time.
    // So we take the first entry in the ListModelList and set as
    // selected.
    if (lml.getSize() > 0) {
      int rowIndex = 0;
      listBoxOrder.setSelectedIndex(rowIndex);
      // get the first entry and cast them to the needed object
      Order anOrder = (Order) lml.get(rowIndex);
      if (anOrder != null) {
        // get the related order positions
        HibernateSearchObject<Orderposition> soOrderPosition = new HibernateSearchObject<Orderposition>(Orderposition.class, getPageSizeOrderPositions());
        soOrderPosition.addFilter(new Filter("order", anOrder, Filter.OP_EQUAL));
        // deeper loading of the relation to prevent the lazy
        // loading problem.
        soOrderPosition.addFetch("article");

        // Set the ListModel.
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.