Welcome to Habanero Land!   Register  |  Login
You are here:   Blogs
  So, why do you need to register to download Habanero and access the additional materials? 
The success of any open source project is based on the community built around it. So go ahead, register / login and get involved!
Blog Roll
 
Categories
 
Search Blog
 
 
Habanero Cloud
 
Habanero Archive
 
Recent Blog Posts
 
 
By Peter Wiles on Wednesday, March 31, 2010 5:34 PM
So the new Habanero version (2.3.2) is out, and one of the new features is an improvement in loading collections in the form of an IN operator (and its negative, not in).  This works similarly to how it's used in SQL - in fact it gets translated into a SQL in clause if your Habanero app is running against a database.  Here's an example of using it in loading a set of Person objects:

BusinessObjectCollection persons = Broker.GetBusinessObjectCollection( "Surname in ('Wiles', 'Powell', 'Naidu')"); It's a really intuitive syntax because of its close relation to SQL's in statement.  Also available is the 'not in' operator which does exactly what it says - searches for items not in the given list.

If you want to load using the more type-safe Criteria objects, or you are using code to build up your criteria clause, you can do it like this:

object[] values = new object[] {"Wiles", "Powell",...

This website is best viewed in Internet Explorer 7 & 8; Firefox; Opera; & Safari.

Get Habanero at SourceForge.net. Fast, secure and Free Open Source software downloads