• 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 my EOQualifier in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating my EOQualifier in code


  • Subject: Re: creating my EOQualifier in code
  • From: Theodore Petrosky <email@hidden>
  • Date: Mon, 25 Feb 2008 07:24:34 -0800 (PST)

Thank you.... seeing it used like this really  help me
understand what is happening...

Ted


--- Daniele Corti <email@hidden> wrote:

> 2008/2/25, Theodore Petrosky <email@hidden>:
> >
> > Now this makes no sense to me and I don't
> understand
> > what to do...
> >
> > This is my method:
> >
> >         public WOComponent useSearchField() {
> >                 EOEditingContext ec =
> > session().defaultEditingContext();
> >
> >                 if
> (userEntries.valueForKey("client") != null) {
> > //only do this if there is a value in the search
> field
> >                         NSMutableArray arg1 = new
> NSMutableArray();
> >
> arg1.addObject(userEntries.valueForKey("client"));
> >
> >
> >                         EOQualifier newQual =
> > EOQualifier.qualifierWithQualifierFormat
> >                         ("(client
> caseInsensitiveLike %@) AND (isComplete
> > =
> > 0)", arg1);
> >
> >                         EOFetchSpecification fs =
> new EOFetchSpecification
> > ("AsAdSched", newQual, null);
> >
> >
> >
> fs.setRefreshesRefetchedObjects(true);
> >
> >
> //NSLog.out.appendln("fetchscpec = " + fs);
> >
> >                         fetchResult =
> ec.objectsWithFetchSpecification
> > (fs);
> >                 }
> >                 return null;
> >
> >         }
>
>
> Look, could you use EOKeyValueQualifier and
> EOAndQualifier?
>
> EOKeyValueQualifier myQual = null;
> NSMutableArray array = new NSMutableArray();
> EOFetchSpecification fs;
>
> myQual = new EOKeyValueQualifier("client",
> EOQualifier.QualifierCaseInsensitiveLike,
> userEntries.valueForKey
> ("client"));
> array.addObject(myQual);
> myQual = new EOKeyValueQualifier("isComplete",
> EOQualifier.QualifierEquals,
> new Integer(0));
> array.addObject(myQual);
>
> fs = new EOFetchSpecification("AsAdSched", new
> EOAndQualifier(array), null);
> fs.setRefreshesRefetchedObjects(true);
>
> fetchResult = ec.objectsWithFetchSpecification(fs);
>
>
>
> I wish I could find examples of some of this stuff.
> >
> > Ted
> >
> > ------------------------------
> >
> > Message: 3
> > Date: Sun, 24 Feb 2008 21:58:38 -0800
> > From: Chuck Hill <email@hidden>
> >
> > Subject: Re: creating my EOQualifier in code
> > To: WebObjects-Dev List
> > <email@hidden>
> > Message-ID:
> >
> >
>
<email@hidden>
> > Content-Type: text/plain; charset=US-ASCII;
> delsp=yes;
> > format=flowed
> >
> >
> > And I think you need to add the *...* to the value
> in
> > arg1, not the
> > format.
> >
> >
> > On Feb 24, 2008, at 9:32 PM, Mike Schrag wrote:
> >
> > > % is SQL syntax ... In EOQualifier syntax, you
> want
> > to use *
> > >
> > > ms
> > >
> > > On Feb 25, 2008, at 12:28 AM, Theodore Petrosky
> > wrote:
> > >
> > >>
> > >>
> > >> I am using the caseinsensitiveLike however I
> can
> > not
> > >> get the global '%' to work...
> > >>
> > >> EOQualifier newQual =
> > >> EOQualifier.qualifierWithQualifierFormat
> > >> ("(client caseInsensitiveLike %@%%) AND
> (isComplete
> > =
> > >> 0)", arg1);
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> >
> > Looking for last minute shopping deals?
> > Find them fast with Yahoo! Search.
> >
>
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> >   _______________________________________________
> >
> > 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
> >
>
>
>
> --
> Daniele Corti
> AIM: S0CR4TE5
> Messenger: email@hidden
>
> --
> Computers are like air conditioners -- they stop
> working properly if you
> open
> WINDOWS
>
> --
> What about the four lusers of the apocalypse? I
> nominate:
> "advertising", "can't log in", "power switch" and
> "what backup?"
> --Alistair Young
>



      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

 _______________________________________________
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: 
 >Re: creating my EOQualifier in code (From: "Daniele Corti" <email@hidden>)

  • Prev by Date: Re: JavaEOGenerator, Eclipse, WOLips, WO 5.4, Mac OS X 10.5.2
  • Next by Date: Re: Wosid suppression broken in 5.4?
  • Previous by thread: Re: creating my EOQualifier in code
  • Next by thread: Re: creating my EOQualifier in code
  • Index(es):
    • Date
    • Thread