public List<UserPermission> retrievePermissions(User user) {
		if (domain == null) {
			return new ArrayList<UserPermission>();
		}
		Criteria criteria = this.dao.newCriteria(UserPermission.class).add(Restrictions.eq("user", user))
				.add(Restrictions.eq("company", domain.getCompany())).add(Restrictions.eq("revoked", false));
		return this.dao.findByCriteria(criteria, UserPermission.class);
	}
public List < UserPermission > retrievePermissions ( User user ) { if ( domain == null ) { return new ArrayList < UserPermission > ( ) ; } Criteria criteria = this . dao . newCriteria ( UserPermission . class ) . add ( Restrictions . eq ( "user" , user ) ) . add ( Restrictions . eq ( "company" , domain . getCompany ( ) ) ) . add ( Restrictions . eq ( "revoked" , false ) ) ; return this . dao . findByCriteria ( criteria , UserPermission . class ) ; }
Busca Lista de permissões do usuário.

@param user Usuário buscado para listar suas permissões.

@return List Lista de permissões do usuário.