Package com.trg.search

Examples of com.trg.search.Filter


      if (order != null) {
        // Set the ListModel and the itemRenderer for the order
        // articles.g

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

        // Set the ListModel.
View Full Code Here


    searchObjCustomer = new HibernateSearchObject<Customer>(Customer.class, pageSizeSearchCustomers);

    // check which field have input
    if (StringUtils.isNotEmpty(tb_Orders_SearchCustNo.getValue())) {
      searchObjCustomer.addFilter(new Filter("kunNr", tb_Orders_SearchCustNo.getValue(), Filter.OP_EQUAL));
    }

    if (StringUtils.isNotEmpty(tb_Orders_CustSearchMatchcode.getValue())) {
      searchObjCustomer.addFilter(new Filter("kunMatchcode", "%" + tb_Orders_CustSearchMatchcode.getValue().toUpperCase() + "%", Filter.OP_ILIKE));
    }

    if (StringUtils.isNotEmpty(tb_Orders_SearchCustName1.getValue())) {
      searchObjCustomer.addFilter(new Filter("kunName1", "%" + tb_Orders_SearchCustName1.getValue() + "%", Filter.OP_ILIKE));
    }

    if (StringUtils.isNotEmpty(tb_Orders_SearchCustCity.getValue())) {
      searchObjCustomer.addFilter(new Filter("kunOrt", "%" + tb_Orders_SearchCustCity.getValue() + "%", Filter.OP_ILIKE));
    }

    setSearchObjCustomer(this.searchObjCustomer);

    // Set the ListModel.
View Full Code Here

      bandbox_OrderList_CustomerSearch.setValue(customer.getKunName1() + ", " + customer.getKunOrt());

      // get all orders for the selected customer
      HibernateSearchObject<Order> soOrder = new HibernateSearchObject<Order>(Order.class, getPageSizeOrders());
      soOrder.addSort("aufNr", false);
      soOrder.addFilter(new Filter("customer", customer, Filter.OP_EQUAL));

      // Set the ListModel.
      getPlwOrders().init(soOrder, listBoxOrder, paging_OrderList);

      // get the first object and poll and show the orderpositions
      ListModelList lml = (ListModelList) listBoxOrder.getModel();

      if (lml.size() > 0) {

        Order anOrder = (Order) lml.get(0);

        if (anOrder != null) {
          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");

          getPlwOrderpositions().init(soOrderPosition, listBoxOrderArticle, paging_OrderArticleList);
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.