• 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
Horizontal inheritance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Horizontal inheritance


  • Subject: Horizontal inheritance
  • From: Mark Wardle <email@hidden>
  • Date: Sun, 3 Jan 2010 20:18:37 +0000

Hi.

I have an "Encounter" <->> "Form" relationship.

However, a "Form" is an abstract entity with a number of concrete subclasses.

EOGenerator generates the methods "forms()" and "forms(EOQualifier qual)".

I'd like to get a list of the form types of a specific subclass.

  /**
   * Returns all of the forms of the specified type
   */
  public NSArray<Form> forms(Class<? extends Form> formClass) {
	  NSMutableArray<Form> forms = new NSMutableArray<Form>();
	  for (Form f : forms()) {
		  if (formClass.isInstance(f)) {
			  forms.add(f);
		  }
	  }
	  return forms;
  }

Surely there's a better way that this?

Am I missing something obvious here with EOF/WO inheritance?

Thanks,

Mark
--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
 _______________________________________________
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

  • Follow-Ups:
    • Re: Horizontal inheritance
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Example of AjaxTabbedPanel use?
  • Next by Date: Re: Example of AjaxTabbedPanel use?
  • Previous by thread: Re: Example of AjaxTabbedPanel use?
  • Next by thread: Re: Horizontal inheritance
  • Index(es):
    • Date
    • Thread