Wildcard searches

View: New views
2 Messages — Rating Filter:   Alert me  

Wildcard searches

by prquinlan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am wanting to do a wild card search within a notes section. So i  
want for example to return everything which has the letter "A".  
Looking on the website i have notice the JDOQL methods. I tried using  
the indexOf in a query:

(releaseRef.notes.indexOf(kk) >-1)

but this doesnt work. I noticed these are under the JDO 2 Quick  
Reference section. Are these implemented yet? If not, is there  
another way to do a wild card search?

Thanks

Phil





--
You receive this message as a subscriber of the speedo@... mailing list.
To unsubscribe: mailto:speedo-unsubscribe@...
For general help: mailto:sympa@...?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

Re: Wildcard searches

by Sebastien Chassande-Barrioz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Philip,

The right way to do pattern matching in JDOQL is to use the
match(String) function such as the following example :
q.setFilter("this.myStringField.match(\"%A%\");
The string parameter is a Java regular expression.

Concerning the indexOf method, I am not sure it is implemented. I have to check.

Regards,
Seb


2007/1/10, Philip Quinlan <p.quinlan@...>:

> I am wanting to do a wild card search within a notes section. So i
> want for example to return everything which has the letter "A".
> Looking on the website i have notice the JDOQL methods. I tried using
> the indexOf in a query:
>
> (releaseRef.notes.indexOf(kk) >-1)
>
> but this doesnt work. I noticed these are under the JDO 2 Quick
> Reference section. Are these implemented yet? If not, is there
> another way to do a wild card search?
>
> Thanks
>
> Phil
>
>
>
>
>
>
> --
> You receive this message as a subscriber of the speedo@... mailing list.
> To unsubscribe: mailto:speedo-unsubscribe@...
> For general help: mailto:sympa@...?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Sébastien Chassande-Barrioz
GSM: (+33) 06.73.16.09.32
MSN: klaneon@...



--
You receive this message as a subscriber of the speedo@... mailing list.
To unsubscribe: mailto:speedo-unsubscribe@...
For general help: mailto:sympa@...?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
LightInTheBox - Buy quality products at wholesale price!