Package webshop.customer.api

Examples of webshop.customer.api.DuplicateEmailException


  public void saveCustomer(Customer customer) {
    JacksonDBCollection<Customer, String> customers = JacksonDBCollection.wrap(customerCollection, Customer.class, String.class);
   
    if(customer.get_id() == null) {
      if(customers.findOne(new BasicDBObject("email", customer.getEmail())) != null) {
        throw new DuplicateEmailException(customer.getEmail());
      }
    }
   
    String savedId = customers.save(customer).getSavedId();
    customer.set_id(savedId);
View Full Code Here

TOP

Related Classes of webshop.customer.api.DuplicateEmailException

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.