Re: Educate me on generics please...
Re: Educate me on generics please...
- Subject: Re: Educate me on generics please...
- From: Mike Schrag <email@hidden>
- Date: Wed, 6 Feb 2008 21:23:36 -0500
NSMutableArray<Object> args2 = new NSMutableArray<Object>();
args2.addObject("portfolio");
args2.addObject(portfolio);
EOQualifier myQualifier2 =
EOQualifier.qualifierWithQualifierFormat("%@ = %@", args2);
NSArray<EOGenericRecord> results =
(NSArray
<
EOGenericRecord
>
)EOQualifier
.filteredArrayWithQualifier(portfolioUserGroups(),myQualifier2);
... or better yet, use the Wonder eogen templates, ERXQ, and ERXKey:
NSArray<Portfolio> results = ERXQ.filtered(portfolioUserGroups(),
PortfolioUserGroup.PORTFOLIO.is(portfolio));
... or better yet, use the Wonder eogen templates + just ERXKey:
NSArray<Portfolio> results =
portfolioUserGroups(PortfolioUserGroup.PORTFOLIO.is(portfolio));
But like everyone else said, you can't really make this generic in any
USEFUL way. Johann's suggestion gets rid of the warning at least,
though.
This "or better yet" message is brought to you by Project Wonder, the
Letter W, and the Number 2.
ms
_______________________________________________
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