Package org.hoteia.qalingo.core.exception

Examples of org.hoteia.qalingo.core.exception.CustomerAttributeException


   
    for (Iterator<CustomerAttribute> iterator = customer.getAttributes().iterator(); iterator.hasNext();) {
      CustomerAttribute customerAttribute = (CustomerAttribute) iterator.next();
      // ATTRIBUTE DEFINITION CAN'T BE NULL
          if(customerAttribute.getAttributeDefinition() == null){
            throw new CustomerAttributeException("Attribute Definition can't be null!");
          }
      // MARKET AREA CAN'T BE NULL IF ATTRIBUTE IS NOT GLOBAL
          if(!customerAttribute.getAttributeDefinition().isGlobal()
              && customerAttribute.getMarketAreaId() == null){
            throw new CustomerAttributeException("Market Area can't be null if Attribute is not global!");
          }
        }
        if (customer.getId() != null) {
            if(em.contains(customer)){
                em.refresh(customer);
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.exception.CustomerAttributeException

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.