Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.Customer


  @After
  public void tearDown() throws Exception {
    CustomerManager customerManager = (CustomerManager) ModelUtil
        .getBean(CustomerManager.MANAGER_NAME);
    Customer customer = customerManager.findByCustomerNr(100000);
    if (customer != null) {
      customerManager.removeCustomer(customer);
    }
  }
View Full Code Here


    transportable.addOrderLine(orderLine);
    final Colli colli = new Colli();
    colli.setColliName("test");
    colli.addOrderLine(orderLine);
    transportable.addColli(colli);
    Customer customer = new Customer();
    transportable.setCustomer(customer);
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
    productArea.setProductAreaGroup(productAreaGroup);
    transportable.setProductArea(productArea);
View Full Code Here

  @Test
  public void insertOrder() throws Exception {
    Order order = new Order();
    orders.add(order);
    Customer customer = new Customer();
    customers.add(customer);
    customer.setCustomerNr(100);
    customer.setFirstName("Atle");
    customer.setLastName("Brekka");
    customerManager.saveCustomer(customer);

    productArea = new ProductArea(null, "test", null, null, null, null,
        null);
    productAreaManager.saveProductArea(productArea);
View Full Code Here

    Order order = orderManager.findByOrderNr("100100100");
    if (order != null) {
      orderManager.removeOrder(order);
    }

    Customer customer = customerManager.findByCustomerNr(100);
    if (customer != null) {
      customerManager.removeCustomer(customer);
    }

  }
View Full Code Here

  /**
   * Oppdaterer enable/disable av felter for kunde
   */
  final void updateCustomerFieldsEnablement() {
    boolean enabled = false;
    Customer customer = (Customer) presentationModel
        .getBufferedValue(OrderModel.PROPERTY_CUSTOMER);
    if (customer == null) {
      enabled = true;
    } else {
      textFieldCustomerNr
          .setText(String.valueOf(customer.getCustomerNr()));
      textFieldCustomerFirstName.setText(customer.getFirstName());
      textFieldCustomerLastName.setText(customer.getLastName());
    }
    textFieldCustomerNr.setEnabled(enabled);
    textFieldCustomerFirstName.setEnabled(enabled);
    textFieldCustomerLastName.setEnabled(enabled);
  }
View Full Code Here

    Order order = orderManager.findByOrderNr("100100100");
    if (order != null) {
      orderManager.removeOrder(order);
    }

    Customer customer = customerManager.findByCustomerNr(100);
    if (customer != null) {
      customerManager.removeCustomer(customer);
    }

  }
View Full Code Here

    transportManager.saveTransport(transport);

    order = new Order();

    customer = new Customer();

    customer.setCustomerNr(100);
    customer.setFirstName("Atle");
    customer.setLastName("Brekka");
    customerManager.saveCustomer(customer);
View Full Code Here

  }

  private void setUpTakstolOrder() throws Exception {
    takstolOrder = new Order();

    takstolCustomer = new Customer();

    takstolCustomer.setCustomerNr(100100);
    takstolCustomer.setFirstName("Ask");
    takstolCustomer.setLastName("Brekka");
    customerManager.saveCustomer(takstolCustomer);
View Full Code Here

    /**
     * @see no.ugland.utransprod.service.CustomerManager#findByCustomerNr(java.lang.Integer)
     */
    public final Customer findByCustomerNr(final Integer nr) {
        Customer customer = new Customer();
        customer.setCustomerNr(nr);
        List<Customer> customers = dao.findByExample(customer);
        if (customers == null || customers.size() != 1) {
            return null;
        }
        return customers.get(0);
View Full Code Here

            Criteria crit = session.createCriteria(Order.class)
                .add(example);

            if (order.getCustomer() != null) {
              Customer customer = order.getCustomer();
              crit = crit.createCriteria("customer");
              if (customer.getCustomerNr() != null) {
                crit.add(Restrictions.eq("customerNr",
                    customer.getCustomerNr()));
              }
              if (customer.getFirstName() != null) {
                crit.add(Restrictions.ilike("firstName",
                    customer.getFirstName()));
              }
              if (customer.getLastName() != null) {
                crit.add(Restrictions.ilike("lastName",
                    customer.getLastName()));
              }
            }
            if (order.getConstructionType() != null) {
              crit.add(Restrictions.eq("constructionType",
                  order.getConstructionType()));
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.model.Customer

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.