Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] findAllByApproximateAttr ?

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] findAllByApproximateAttr ?


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Tom Zeller <>
  • Cc: Grouper Dev <>
  • Subject: RE: [grouper-dev] findAllByApproximateAttr ?
  • Date: Mon, 23 Feb 2009 13:30:39 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US

If you are using the API, you can probably just use HibernateSession.  If we expose API finder methods that execute arbitrary SQL, then I would be worried about SQL injection… (e.g. if exposed over WS or UI or something)… anyways, email me what you need to do and I might be able to help with HibernateSession direct calls…

 

Chris

 

From: [mailto:] On Behalf Of Tom Zeller
Sent: Monday, February 23, 2009 1:28 PM
To: Chris Hyzer
Cc: Grouper Dev
Subject: Re: [grouper-dev] findAllByApproximateAttr ?

 

It seems to make sense to use like instead of =, leaving wildcards to the caller.

 

I guess I need findAllByCaseInsensitiveAttr.

 

Should there be a way to execute an arbitrary hql or sql statement ?

On Mon, Feb 23, 2009 at 12:18 PM, Chris Hyzer <> wrote:

I wonder if it would be confusing if findGroupByAttr just used "like" instead of "=", so if you don't pass in wildcards, you get by attr, and if you pass in wildcards, it would do the right thing…  just trying to avoid too many overloads… maybe other methods could benefit by this too…

 

Chris

 

From: [mailto:] On Behalf Of Tom Zeller
Sent: Monday, February 23, 2009 1:14 PM
To: Grouper Dev
Subject: [grouper-dev] findAllByApproximateAttr ?

 

Would it make sense to provide a method like Hib3GroupDAO.findAllByApproximateAttr() that doesn't surround the attribute value with wildcards ? Or perhaps a boolean arg to turn off the wildcards ?

 

Instead of

 

.setString( "value", "%" + val.toLowerCase() + "%" )

 

just

 

.setString( "value", val.toLowerCase() )

 

I'm interested because I'd like to search for case-insensitive group names and partial case-insensitive group mail addresses (value like "mailLHS@%") in order to force uniqueness of our naming conventions.

 

Thanks,

TomZ

 




Archive powered by MHonArc 2.6.16.

Top of Page