Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] Find all memberships by attribute

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] Find all memberships by attribute


Chronological Thread 
  • From: Gagné Sébastien <>
  • To: Gagné Sébastien <>, <>
  • Subject: RE: [grouper-dev] Find all memberships by attribute
  • Date: Wed, 27 Jun 2012 11:39:40 -0400

I believe I answered myself : I checked the LDAP Loader code and found the new way :

Set<AttributeAssign> attributeAssigns = GrouperDAOFactory.getFactory().getAttributeAssign().findAnyMembershipAttributeAssignments()

 

It wasn’t very obvious, but I think it does what I need.

Thanks

 

De : [mailto:] De la part de Gagné Sébastien
Envoyé : 27 juin 2012 11:28
À :
Objet : [grouper-dev] Find all memberships by attribute

 

Hi,

Using the Grouper API, I was wondering if a  « find all membership based on an attribute » helper method existed somewhere ? Similar to the GroupFinder.findAllByAttribute() but in MembershipFinder where it would return all the membership where attribute X is assigned to it (no matter which value is assigned). I think a SQL/Hibernate query might do the job, but maybe it could be better supported.

 

What would happen if I’m using an attribute without a value (as in a flag, where I will act differently if that attribute is assigned to a membership but where I don’t care if it has a value) ? I see that the value is mandatory in the GroupFinder, but I was able in the Lite UI to create an attribute that requires no value. I recall reading about two types of attributes (as in the old attributes are used for the SQL Loader and the new attributes are used in the LDAP Loader). I see two set of tables in the DB Attributes and Attribute_[assign|def| etc]. I think GroupFinder.findAllByAttribute is using the old Attributes.

 

How will this evolve ? Will the old attributes be phased out ? What happens to those helper methods ?

 

Thanks

 

 

Sébastien Gagné,     | Analyste en informatique

514-343-6111 x33844  | Université de Montréal,

                     | Pavillon Roger-Gaudry, local X-100-11

 




Archive powered by MHonArc 2.6.16.

Top of Page