class HibernateUserDAO extends HibernatePersistentObjectDAO<User> implements UserDAO {

	@Override
	public List<User> findByUsernameAndName(String username, String name) {
		try {
			return findByWhere("lower(_entity.name) like ?1 and _entity.username like ?2",
					new Object[] { name.toLowerCase(), username }, null, null);
		} catch (PersistenceException e) {
			log.error(e.getMessage(), e);
			return new ArrayList<User>();
		}
	}

	private  HibernateUserDAO();

}