Re: Convenience functions in model classes
Re: Convenience functions in model classes
- Subject: Re: Convenience functions in model classes
- From: Mike Schrag <email@hidden>
- Date: Mon, 14 Apr 2008 16:15:54 -0400
I missed the first part of this thread (through some lost e-mail). I
wanted to check about something though.
As I am looking at this API, I am noticing that the er.extensions
package is really, really, really big with lots of different kinds
of classes and that there is no package documentation at all.
Would anybody mind if I take a stab at adding javadoc as I try out
these classes? Are these classes going to be part of some upcoming
factorization?
There's no package documentation because there are very few packages
in Wonder (though this will be changing probably for WWDC / Wonder
5.0). However, there should be class/method javadoc for almost
everything. More documentation is always welcome, though. This
should also move over to wonder-disc so non-Wonder people don't yell
at us on wo-dev :)
The original post I made about ERXKey on wonder-disc could probably be
start for this particular one:
"I guess I forgot to post on this, but ERXKey is now in along with
support for chainable qualifiers. WOLips also has two new eogen
templates WonderEntity.java and _WonderEntity.java that use ERXKey.
What it provides:
public class Person .. {
public static final ERXKey<Company> company = new
ERXKey<Company>("company");
public static final ERXKey<NSTimestamp> expirationDate = new
ERXKey<NSTimestamp>("expirationDate");
}
then you can do:
Company someCompany = ...;
NSTimestamp now = new NSTimestamp();
EOQualifier qualifier =
Person.company.is(someCompany).and(Person.expirationDate.after(now));
There are now ERX subclasses of all of the standard qualifiers that
provide and/or/not chaining support, which ERXKey is returning by
default. ERXQ returns these new chainable qualifiers as well.
You can .append ERXKeys, so you can do
Person.company.append(Company.name) and you will get an ERXKey<String>
back that represents "company.name", though there is a current
limitation that you can't append keypaths through an NSArray (meaning
if you try to do Company.employees.name to get an NSArray<String> it
will get confused and think it's a simple String instead)."
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