Package org.arquillian.example.dao

Examples of org.arquillian.example.dao.UserDAOException


    try {
      em.persist(user);
      return user.getId();
    } catch (Exception e) {
      logger.log(Level.INFO, "Unable to create a user {0}.", user);
      throw new UserDAOException();
    }
  }
View Full Code Here


  public void deleteUser(User user) throws UserDAOException {
    try {
      em.remove(user);
    } catch (Exception e) {
      logger.log(Level.INFO, "Unable to delete a user {0}.", user);
      throw new UserDAOException();
    }
  }
View Full Code Here

            } else {
              return null;
            }
        } catch (Exception ex) {
            logger.log(Level.INFO, ex.getMessage());
            throw new UserDAOException();
        }
  }
View Full Code Here

      q.setParameter("password", user.getPassword());
      List<?> result = q.getResultList();
      return result.size() == 1;
    } catch(Exception ex) {
      logger.log(Level.INFO, ex.getMessage());
      throw new UserDAOException();
    }
  }
View Full Code Here

TOP

Related Classes of org.arquillian.example.dao.UserDAOException

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.