Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] New option in findAllByApproximateName ?

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] New option in findAllByApproximateName ?


Chronological Thread 
  • From: Gagné Sébastien <>
  • To: <>
  • Subject: RE: [grouper-dev] New option in findAllByApproximateName ?
  • Date: Fri, 14 Dec 2012 15:29:07 -0500

Sorry for spamming, I don’t know how I missed the fact that the method I proposed already exists with the same name…

 

I finally found it so you can ignore my previous request, although it might be nice to have.

 

 

De : Gagné Sébastien
Envoyé : 14 décembre 2012 15:02
À : Gagné Sébastien;
Objet : RE: [grouper-dev] New option in findAllByApproximateName ?

 

Another suggestion of solution for my problem :

Create a new method “findAllByApproximateAttr“ where it’s a copy of “findAllByAttr” but with a LIKE instead of an EQUALS

 

On another note, maybe the two “findAllByAttr” should be merged, there’s only 3 different lines that could easily be put in a “If scope == null”

 

Thanks

 

 

De : [] De la part de Gagné Sébastien
Envoyé : 14 décembre 2012 13:05
À :
Objet : [grouper-dev] New option in findAllByApproximateName ?

 

Hi,

We have a use case where we want to find groups based on a pattern only in their name (not in their display name, it must ignore it). Users have the possibility to search for courses based on a pattern in their course ID, but since our courses’ display name includes the course description(i.e. courseID + ", " + courseDescription), some of the patterns used are matching against part of the description  and these shouldn’t be included.

 

Example :

Search for “CHA%”

Should return :

CHA1010, Change management in software

 

But shouldn’t include :

MEC0101, Mechanical engineering introduction

 

I’m currently using “GrouperDAOFactory.getFactory().getGroup().findAllByApproximateCurrentName(“string”)” but I found out it’s always using the display name, so it’s not suitable for our need.

 

Would it be possible to add an overload with a Boolean to include or not the displayName ? Kind of like the inclusion or not of the alternateName.

Or maybe a new set of methods “findAllByApproximateCurrentNameOnly” ? (the helper method will still need a new Boolean)

 

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