class HibernateUserDAO extends HibernatePersistentObjectDAO<User> implements UserDAO {

	@Override
	public User findByUsernameIgnoreCase(String username) {
		User user = null;
		try {
			List<User> coll = findByWhere("lower(_entity.username) = ?1", new Object[] { username.toLowerCase() }, null,
					null);
			if (coll.size() > 0)
				user = coll.iterator().next();
			initialize(user);
		} catch (PersistenceException e) {
			log.error(e.getMessage(), e);
		}
		return user;
	}

	private  HibernateUserDAO();

}