Skip to Content.
Sympa Menu

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

Subject: Grouper Developers Forum

List archive

Re: [grouper-dev] findAllByApproximateAttr ?


Chronological Thread 
  • From: Tom Zeller <>
  • To: Chris Hyzer <>
  • Cc: Grouper Dev <>
  • Subject: Re: [grouper-dev] findAllByApproximateAttr ?
  • Date: Mon, 23 Feb 2009 12:28:20 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=YHtBWcqtliKuHbgPo1w7uOJe3PFcQ7naN1SqKRem7vONWVrk6wjgJ5gu5jDPPGGhUK rbZk8xR1NtUJJ2ikjObM4xQXhxf9fNuPBniePt3XifIh3265SWVoWpyWYWol6ipvn/P9 gZOMmeHVOXL26M4eGMPCBFvpFq3dprrC3xUI4=

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