Package com.ketayao.ketacustom.exception

Examples of com.ketayao.ketacustom.exception.NotExistedException


  @Override
  public void saveOrUpdate(Organization organization) {
    if (organization.getId() == null) {
      Organization parentOrganization = organizationDAO.findOne(organization.getParent().getId());
      if (parentOrganization == null) {
        throw new NotExistedException("id=" + organization.getParent().getId() + "父组织不存在!");
      }
     
      if (organizationDAO.getByName(organization.getName()) != null) {
        throw new NotExistedException(organization.getName() + "已存在!");
      }
    }
   
    organizationDAO.save(organization);
  }
View Full Code Here

TOP

Related Classes of com.ketayao.ketacustom.exception.NotExistedException

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.