• 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: EOQualifiers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifiers


  • Subject: Re: EOQualifiers
  • From: David Avendasora <email@hidden>
  • Date: Fri, 23 Jan 2009 15:04:17 -0500

The standard way:

EOQualifier lowerQual = new EOKeyValueQualifier("articleDate", EOQualifier.QualifierOperatorGreaterThanOrEqualTo, startDate);
EOQualifier upperQual = new EOKeyValueQualifier("articleDate", EOQualifier.QualifierOperatorLessThanOrEqualTo, endDate);
NSMutableArray<EOQualifier> qualifiers = new NSMutableArray<EOQualifier>();
qualifiers.addObject(lowerQual);
qualifiers.addObject(upperQual);
EOQualifier qualifier = new EOAndQualifier(qualifiers);


The Wonder way:

EOQualifier qual = Article.ARTICLE_DATE.between(startDate, endDate);

This of course requires that you are using project Wonder and it's EOGenerator templates.

They rock.

This is a pretty good example of the kinds of things Wonder will do for you.

1/6th the code, and it is MUCH more readable.


Dave



On Jan 23, 2009, at 2:41 PM, Amedeo Mantica wrote:

Hello,

does anyone know hot to build a quelifier for looking up an item in a Date range?

I have a table of Articles, and I need to select a range by articleDate

I tried but I was unable to build a working qualifier

Regards
Amedeo
_______________________________________________
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



_______________________________________________ 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
References: 
 >EOQualifiers (From: Amedeo Mantica <email@hidden>)

  • Prev by Date: Re: EOQualifiers
  • Next by Date: Re: EOQualifiers
  • Previous by thread: Re: EOQualifiers
  • Next by thread: why WOActionResults instead of void ?
  • Index(es):
    • Date
    • Thread