• 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: "Jonathan Fleming" <email@hidden>
  • Date: Fri, 30 Jul 2004 06:30:44 +0100

If you don't want to use the code I sent before this post you can simply
create a fetchSpec in the Tab Entity of EOModeler and call it TabFetchSpec for example, give it a qualifier of (krit like $ krit) then do the usual queryDictionary coding in YourClass. I presume you are familar with such? If not I left an example below:
Regards
Jonathan :^)


// in case you don't know how to code this
// again, this is untested

import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;

public class YourClass extends WOComponent {

   /** @TypeInfo Tab */
   protected NSArray tabList;
   protected Tab tab;
   protected NSMutableDictionary queryDict;
   private Session session;
   private EOEditingContext ec;


/** * Constructor */ public RefererEditPage(WOContext context) { super(context);

       // get session
       session = (Session)session();
       // get editing context
       ec = session.defaultEditingContext();

       queryDict = new NSMutableDictionary();
   }

   // get query Dictionary.
   public NSMutableDictionary getQueryDict() {
       return queryDict;
   }

   // set query Dictionary.
   public void setQueryDict(NSMutableDictionary newQueryDict) {
       queryDict = newQueryDict;
       queryDict.setObjectForKey( "Sent EMail", "krit" );
   }


public void appendToResponse(WOResponse response, WOContext context) {

EOEditingContext ec = session().defaultEditingContext();
EOFetchSpecification fs =
EOFetchSpecification.fetchSpecificationNamed("TabFetchSpec", "Tab");
EOFetchSpecification boundFs = fs.fetchSpecificationWithQualifierBindings(queryDict);
tabList = ec.objectsWithFetchSpecification(boundFs);


       super.appendToResponse(response, context);
   }
}


From: "Sako!" <email@hidden>
To: <email@hidden>
CC: "omni group" <email@hidden>
Subject: how do i say that in EOModeler
Date: Thu, 29 Jul 2004 17:04:15 +0200

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.



_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger
_______________________________________________
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.



  • Follow-Ups:
    • Re: 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: Related to WO (a little)
  • Previous by thread: RE: how do i say that in EOModeler
  • Next by thread: Re: how do i say that in EOModeler
  • Index(es):
    • Date
    • Thread