Examples of CustomerExample


Examples of org.company.recordshop.domain.CustomerExample

        customerDao.listPageByExample(null, 0, 0, "firstName", true);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testListPageNullSortingProperty() {
        customerDao.listPageByExample(new CustomerExample(), 0, 0, null, true);
    }
View Full Code Here

Examples of org.company.recordshop.domain.CustomerExample

   * @return {@link CustomerExample}, the resulting businessclass object.
   */
  public CustomerExample exampleFromDto(
      final CustomerWithOrdersAndOrderLines source) {
    Assert.notNull(source, "argument [source] may not be null");
    CustomerExample result = new CustomerExample();

    if (source.getFirstName() != null) {
      result.setFirstName(source.getFirstName());
    }
    if (source.getLastName() != null) {
      result.setLastName(source.getLastName());
    }
    if (source.getBirthDate() != null) {
      result.setBirthDate(source.getBirthDate());
    }
    if (source.getCustomerNr() != null) {
      result.setCustomerNr(source.getCustomerNr());
    }

    return result;
  }
View Full Code Here

Examples of org.company.recordshop.domain.CustomerExample

        service.createCustomer(new Customer("Eric Jan", "Malotaux", date(), 3));
        sessionFactory.getCurrentSession().flush();
        sessionFactory.getCurrentSession().clear();
        assertEquals(3, countRowsInTable("Customer_TABLE"));

        CustomerExample example = new CustomerExample();
        List<Customer> result = service.findCustomerByExample(example);
        assertEquals(3, result.size());
       
        example.setBlackListed(false);
        result = service.findCustomerByExample(example);
        assertEquals(3, result.size());
       
        example.setBlackListed(true);
        result = service.findCustomerByExample(example);
        assertEquals(0, result.size());
       
        example.setBlackListed(null);
        example.setFirstName("Jo");
        result = service.findCustomerByExample(example);
        assertEquals(2, result.size());
    }
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.