Am 18.07.2012 um 22:00 schrieb Farrukh Ijaz 
<[email protected]>:

> Approach 2: This will make 1 db call, uses less memory. It's quite simple and 
> easy to understand. The whole idea is to push the nulls at the end with 
> minimum instructions.

It uses less memory, but still does the null filtering in Java. I think the 
question was how to delegate that task to the database.

>       Enumeration<MyTable> e = objects.objectEnumerator();
>       while(e.hasMoreElements()) {
>               object = e.nextElement();
>       }

Java side note: if you can't use a Java 5 foreach loop and still have to use 
Enumeration, you can at least do it in a for loop so that the reference to the 
Enumeration object is contained inside the loop:

>       for( Enumeration<MyTable> e = objects.objectEnumerator(); 
> e.hasMoreElements(); ) {
>               object = e.nextElement();
>       }

In regard to the original question: I'm not sure what you're up to, Grégoire. 
If you just don't want to deal with the null columns, include that in the 
fetchspec:

> new EOKeyValueQualifier( key, EOQualifier.QualifierOperatorNotEqual, 
> NSKeyValueCoding.NullValue );


That's plain WO. Perhaps there's even a shorter way using some Wonder stuff I 
don't know about yet.

Maik
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to