• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOSortOrdering first null
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOSortOrdering first null


  • Subject: Re: EOSortOrdering first null
  • From: Maik Musall <email@hidden>
  • Date: Thu, 19 Jul 2012 08:39:55 +0200


Am 18.07.2012 um 22:00 schrieb Farrukh Ijaz <email@hidden>:

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: EOSortOrdering first null
      • From: Farrukh Ijaz <email@hidden>
References: 
 >EOSortOrdering first null (From: ALEXANDRE Grégoire <email@hidden>)
 >Re: EOSortOrdering first null (From: Farrukh Ijaz <email@hidden>)
 >Re: EOSortOrdering first null (From: ALEXANDRE Grégoire <email@hidden>)
 >Re: EOSortOrdering first null (From: Farrukh Ijaz <email@hidden>)

  • Prev by Date: Re: EOSortOrdering first null
  • Next by Date: Re: EOSortOrdering first null
  • Previous by thread: Re: EOSortOrdering first null
  • Next by thread: Re: EOSortOrdering first null
  • Index(es):
    • Date
    • Thread