Package es.udc.tfg.journals.model.exceptions

Examples of es.udc.tfg.journals.model.exceptions.InstanceNotFoundException


  public void updateUserDetails(Long userId, UserDetails userDetails)
      throws InstanceNotFoundException, DuplicateInstanceException {
    User user = userDao.find(userId);
    try {
      if (user.getEmail().equals(userDetails.getEmail())) {
        throw new InstanceNotFoundException(null, null);
      }
      userDao.findByEmail(userDetails.getEmail());
      throw new DuplicateInstanceException(userDetails.getEmail(),
          User.class.getName());
    } catch (InstanceNotFoundException e) {
      try {
        if (user.getLogin().equals(userDetails.getLogin())) {
          throw new InstanceNotFoundException(null, null);
        }
        userDao.findByLogin(userDetails.getLogin());
        throw new DuplicateInstanceException(userDetails.getLogin(),
            User.class.getName());
      } catch (InstanceNotFoundException e1) {
View Full Code Here

TOP

Related Classes of es.udc.tfg.journals.model.exceptions.InstanceNotFoundException

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.