• 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: how do i say that in EOModeler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do i say that in EOModeler


  • Subject: Re: how do i say that in EOModeler
  • From: Bill Reynolds <email@hidden>
  • Date: Thu, 29 Jul 2004 09:00:33 -0700

[oops, resending w/out .html, sorry for prior format]

Sako!,

The like-where9 condition is pretty simple to use.  I9ve pasted a function
below that I use to find a 3company name like92.  It9s a qualified9 fetch
spec and it9s designed to do what you9re doing.

Hope it helps,

-Bill

    public void searchByCoName(String coNameToLookFor) {

        setSearchStringDisplay(coNameToLookFor);
        setFoundMatch(true);
        try{
        //Build qualifier
        NSMutableArray args = new NSMutableArray();
        args.addObject(coNameToLookFor + "*");  //the "*" is a wildcard
pasted to the end of the search string
        EOQualifier qualifier =
EOQualifier.qualifierWithQualifierFormat("CO_NAME like %@", args);

        //Build fetch spec
        EOFetchSpecification spec = new EOFetchSpecification("RegUsers",
qualifier, null);

        //Get editing context
        EOEditingContext ec = session().defaultEditingContext();

        //Fetch
        NSArray array = ec.objectsWithFetchSpecification(spec);
        foundUsers = new NSMutableArray(array);

        //stuff
        if(foundUsers.count() == 0)
            setFoundMatch(false);

        } catch (Exception e) {

        }
    }



> From: Sako! <email@hidden>
> Date: Thu, 29 Jul 2004 08:04:15 -0700
> To: <email@hidden>
> Cc: omni group <email@hidden>
> Subject: how do i say that in EOModeler
>
> hi,
>
> i have a table TAB, includes Column Krit from kind Text in my MS-SQL.
> ------------------------------------------
> i want to search the rows who include the text "Sent EMail".  i do this :
>
> SELECT T1.Krit
> FROM  TAB T1
> WHERE T1.Krit like '%Sent EMail%'
>
> ------------------------------------------
>
> and if i want to search the rows which dont include the text"Sent EMail". i
> do this:
>
> SELECT T1.Krit
> FROM  TAB T1
> WHERE T1.Krit not like '%Sent EMail%'
>
> ------------------------------------------
> both sql work.
>
> now my question how do i say that in EOModeler?
>
> i tried with (krit like '%Sent EMail%') in a Fetch but id didnt work.
>
> regards
>
> Sako.
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >how do i say that in EOModeler (From: "Sako!" <email@hidden>)

  • Prev by Date: Re: how do i say that in EOModeler
  • Next by Date: Re: directaction new session created
  • Previous by thread: Re: how do i say that in EOModeler
  • Next by thread: Re: directaction new session created
  • Index(es):
    • Date
    • Thread