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

Re: WO NewBie


  • Subject: Re: WO NewBie
  • From: LD <email@hidden>
  • Date: Tue, 1 Feb 2005 11:03:44 +1100

Hi there,

do follow Zak's suggestion...

You might also like to look at...
http://developer.apple.com/documentation/WebObjects/
http://developer.apple.com/documentation/WebObjects/Enterprise_Objects/ index.html


And various helpful Programming Topics linked from the Legacy Docs (strangely not from the current docs):
http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/ WebObjects_5/Topics/TopicsTOC.html


an example [fetch] code is greatly appriciated...

So, I assume that you've made Attribute myID the primary key (Key Symbol in EOModeler) and is also available as a class attribute (Diamond symbol). Your myValue attribute will just have the diamond. Then you've exported the java class.


Fetching the values is really going to depend on how else you're dealing with the fetched object(s) (i.e., rows) if at all. Can the user see a list of available keys, for example? If yes, then it'll make more sense to do in-memory filtering (see first link above) on the objects you have already fetched. If no, raw row fetching could make better sense (see both links). etc etc You'll need to decide how you are using the data, whether the user can edit the objects etc.

After you've gone through the tutorial Zak mentioned (make sure you understand the concepts there), then the below may make more sense...

Example (without exception handling, action methods, etc) snippets...

pkey = new Integer(userInputKey);

// in-memory filter example snippet
kvq = new EOKeyValueQualifier("myID", EOQualifier.QualifierOperatorEqual, pkey);
filteredArray = EOQualifier.filteredArrayWithQualifier(fetchedEntities, kvq);
if (...) {
selectedEntity = filteredArray.objectAtIndex(0);
}


// _or_
// EOUtilities fetch example snippet
selectedEntity = (T_TEST)EOUtilities.objectWithPrimaryKeyValue(ec, "T_TEST", pkey);


HTH somewhat...

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: 
 >WO NewBie (From: WELEMSKI <email@hidden>)

  • Prev by Date: Re: Status of Windows support
  • Next by Date: Fetching record counts.
  • Previous by thread: Re: WO NewBie
  • Next by thread: Re: WO NewBie
  • Index(es):
    • Date
    • Thread