Examples of Customer


Examples of by.fly.model.Customer

    @Autowired
    CustomerRepository customerRepository;

    @Test
    public void testRepo() {
        Customer customer = createCustomer();

        OrderItem orderItem = new OrderItem(customer, LocalDateTime.now().plusDays(3));
        orderItemRepository.save(orderItem);

        assertTrue(orderItem.getId() > 0);
View Full Code Here

Examples of cat.quickdb.complexDataStructure.model.Customer

        buys.add(buy2);
        buys.add(buy3);

        AddressComplex address = new AddressComplex("unnamed street", 123);

        Customer customer = new Customer("Diego", "Sarmentero",
                "diego.sarmentero@gmail.com", address, buys);

        Assert.assertTrue(admin.save(customer));

        Customer customer2 = new Customer();
        admin.obtain(customer2).If("name").equal("Diego").find();

        Assert.assertTrue(customer2.getEmail().equals("diego.sarmentero@gmail.com"));
        Assert.assertTrue(customer2.getBuy().size() > 2);
        Assert.assertTrue(((Buy)customer2.getBuy().get(0)).getCodes().size() > 1);
    }
View Full Code Here

Examples of cl.molavec.jpa.entities.Customer

    public void insertDummyData()  {
     
      //Entities
      QuotationProperties qp = null;
    QUser quser = null;
    Customer customer = null;
    Company company = null;
    Quotation quotation =null;
   
   
    EntityManager em = this.emf.createEntityManager();
View Full Code Here

Examples of com.alexnevsky.hotel.model.Customer

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      OrderDAO orderDAO = daoFactory.getOrderDAO();
      Customer customer = (Customer) request.getSession().getAttribute(AttributesManager.ATTRIBUTE_CUSTOMER);

      Order order = null;
      order = orderDAO.find(orderId);

      if (customer.getId().compareTo(order.getCustomerId()) == 0
          && OrderStatusEnum.UNCHECKED.equals(order.getOrderStatus())) {
        orderDAO.update(OrderStatusEnum.CANCELLED, orderId);

        logger.info("Customer '" + request.getSession().getAttribute(AttributesManager.PARAM_NAME_LOGIN)
            + "'. Change order status to '" + OrderStatusEnum.CANCELLED + "' for '" + order + "'"
View Full Code Here

Examples of com.apress.prospring.ch10.domain.Customer

  }
 
  private void customer() {
    CustomerDao customerDao = (CustomerDao)context.getBean("customerDao");
   
    Customer janm = customerDao.getById(1);
    Customer robh = customerDao.getById(2);
   
    System.out.println(janm);
    System.out.println(robh);
  }
View Full Code Here

Examples of com.apress.prospring.ch9.domain.Customer

 
  public void customer() {
    CustomerDao customerDao = (CustomerDao)context.getBean("customerDao");
    List customers = customerDao.getAll();
    for (Iterator i = customers.iterator(); i.hasNext();) {
      Customer customer = (Customer)i.next();
      System.out.println(customer);
    }
   
    customers = customerDao.getAllWithOnlyOnePermission();
    for (Iterator i = customers.iterator(); i.hasNext();) {
      Customer customer = (Customer)i.next();
      System.out.println(customer);
    }   
   
    Customer customer = new Customer();
    customer.setFirstName("Jack");
    customer.setLastName("Schitt");
    customer.setPermissions(new HashSet());
    customer.setAddresses(new HashSet());
   
    CustomerAddress ca = new CustomerAddress();
    ca.setLine1("1");
    ca.setLine2("2");
    ca.setCity("Manchester");
    ca.setPostCode("M1 xx");
   
    customer.getAddresses().add(ca);
   
    Permission p = new Permission();
    p.setPermissionId(1);
   
    customer.getPermissions().add(p);
   
    //customerDao.save(customer);
  }
View Full Code Here

Examples of com.ateam.webstore.model.Customer

    return repository.getOrdersInCompleted();
  }

  public Collection<Orders> getByCustomerId(Serializable id) {
    OrdersDAO repository = new OrdersDAO();
    Customer customer = new CustomerService().getById(id);
    return repository.getByCustomer(customer);
  }
View Full Code Here

Examples of com.avaje.tests.model.basic.Customer

   
    List<Customer> list = Ebean.find(Customer.class).findList();
   
    Listener listener = new Listener();
   
    Customer customer = list.get(0);
    Ebean.getBeanState(customer).addPropertyChangeListener(listener);
   
    customer.setName("modName");
    customer.setSmallnote("modSmallNote");
   
    Assert.assertEquals(2, listener.events.size());
    Assert.assertEquals("modName", listener.events.get(0).getNewValue());
    Assert.assertEquals("name", listener.events.get(0).getPropertyName());
    Assert.assertEquals("modSmallNote", listener.events.get(1).getNewValue());
View Full Code Here

Examples of com.bookstore.domain.model.Customer

    customers = new ArrayList<Customer>();
   
    // Add the fake data
   
    // CUSTOMER 1
    Customer customer1 = new Customer();
    customer1.setId("0");
    customer1.setFirstName("Eric");
    customer1.setLastName("Burns");
   
    customer1.setUsername("ericburns");
    customer1.setPassword("password");
   
    List<Address> c1a = new ArrayList<Address>();
    c1a.add(mat.addresses.get(0));
    customer1.setAddresses(c1a);
   
    List<CreditCard> c1cc = new ArrayList<CreditCard>();
    c1cc.add(mcct.creditCards.get(0));
    c1cc.add(mcct.creditCards.get(1));
    customer1.setCreditCards(c1cc);
   
    List<Book> c1b = new ArrayList<Book>();
    c1b.add(mbt.books.get(0));
    c1b.add(mbt.books.get(1));
    c1b.add(mbt.books.get(2));
    customer1.setBooks(c1b);
   
    // CUSTOMER 2
    Customer customer2 = new Customer();
    customer2.setId("1");
    customer2.setFirstName("Leroy");
    customer2.setLastName("Jenkins");
   
    customer2.setUsername("ljenkins");
    customer2.setPassword("password");
   
    List<Address> c2a = new ArrayList<Address>();
    c2a.add(mat.addresses.get(1));
    customer2.setAddresses(c2a);
   
    List<CreditCard> c2cc = new ArrayList<CreditCard>();
    c2cc.add(mcct.creditCards.get(3));
    customer2.setCreditCards(c2cc);
   
    List<Book> c2b = new ArrayList<Book>();
    c2b.add(mbt.books.get(4));
    c2b.add(mbt.books.get(1));
    c2b.add(mbt.books.get(7));
    customer2.setBooks(c2b);
   
    // CUSTOMER 3
    Customer customer3 = new Customer();
    customer3.setId("2");
    customer3.setFirstName("Thomas");
    customer3.setLastName("Cobal");
   
    customer3.setUsername("t_co");
    customer3.setPassword("password");
   
    List<Address> c3a = new ArrayList<Address>();
    c3a.add(mat.addresses.get(2));
    customer3.setAddresses(c3a);
   
    List<CreditCard> c3cc = new ArrayList<CreditCard>();
    c3cc.add(mcct.creditCards.get(2));
    customer3.setCreditCards(c3cc);
   
    List<Book> c3b = new ArrayList<Book>();
    c3b.add(mbt.books.get(3));
    c3b.add(mbt.books.get(5));
    c3b.add(mbt.books.get(6));
    c3b.add(mbt.books.get(8));
    customer3.setBooks(c3b);
   
    customers.addAll(Arrays.asList(customer1, customer2, customer3));
  }
View Full Code Here

Examples of com.camunda.fox.model.entity.Customer

    Address address = new Address(order.getAddress().getStreet(), order
        .getAddress().getNumber(), order.getAddress().getZipcode(),
        order.getAddress().getCity(), order.getAddress().getState(),
        order.getAddress().getCountry());
    Customer customer = new Customer(order.getPerson().getFirstname(),
        order.getPerson().getLastname(), order.getPerson().getTitle(),
        order.getPerson().getDateofbirth(), order.getPerson()
            .getPlaceofbirth(), order.getPerson().getGender(),
        order.getPerson().getPhonenumber(), order.getPerson()
            .getEmail(), address);
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.