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

Re: Creating complex qualifiers


  • Subject: Re: Creating complex qualifiers
  • From: Lachlan Deck <email@hidden>
  • Date: Tue, 28 Oct 2008 08:41:23 +1100

Hi Catarina,

On 22/10/2008, at 3:27 AM, Catarina Simoes wrote:

In the project I'm working on I'm trying to refactor some old code that uses
EOSQLQualifier.
I'd like to move on from EOSQLQualifier, not only because it's deprecated
but the string arguments are quite a mess and error prone.
The sql statement generated by the fetch specification and the
EOSQLQualifier is something like:


(row1 + row2) / 100 >= value

The code to create the qualifier is:

String format = "(%A + %A) / 100 > = %@";
String args = new Object[] {entityProperty1, entityProperty2, value};
EOQualifier qualifier = new EOSQLQualifier(entity, format, args );

The variables entityProperty1 and entityProperty2 are entity properties
(attributes or relationship key paths).


Basically I want to create complex qualifiers not restricted to single
attributes or relationships but involving arithmetic operations
between them.
Has anyone done something like this?

It may be that you'll need to create some custom EOQualifier subclasses to achieve this.
Or have a look at ERXEOControlUtilities.aggregate* in Wonder.
Or http://code.google.com/p/houdah-webobjects-frameworks/wiki/QualifierAdditions


with regards,
--

Lachlan Deck



_______________________________________________
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: 
 >Creating complex qualifiers (From: "Catarina Simoes" <email@hidden>)

  • Prev by Date: Re: WO Equivalent of prepared statement
  • Next by Date: Re: WO Equivalent of prepared statement
  • Previous by thread: Creating complex qualifiers
  • Next by thread: Development with a Servlet container
  • Index(es):
    • Date
    • Thread