Code example for Logger

Methods: info, x 1

	 * @param name the name of the Role to be retrieved 
	 * @return the specific role object 
	 * @throws RoleNotFoundException 
	public Role getRoleByName(String name) throws RoleNotFoundException{"creating query");
		Query query = manager.createQuery("SELECT r FROM RoleImpl AS r WHERE =:name");"setting parameter name to " + name);
		query.setParameter("name", name);"query.getsingleresult()");
		Role role = null;
		try {"In catch block to retrieve user");
			role = (Role)query.getSingleResult();
		} catch (NoResultException e) {
			// Catch the runtime exception and set user to null"Role doesn't exist so setting to null");
			role = null;
		}"testing for role == null");
		if( role == null ) throw new RoleNotFoundException();"Role name = " + role.getName());
		return role;
Connect your IDE to all the code out there  Get Codota for Java