Re: Accessing args in an EOQualifier
Re: Accessing args in an EOQualifier
- Subject: Re: Accessing args in an EOQualifier
- From: "Daniele Corti" <email@hidden>
- Date: Tue, 24 Oct 2006 21:14:09 +0200
yes, i understand, well I think you shold do something like this:
String employeeLastname;
NSArray bindKeys = myQualifier.bindingKeys();
employeeLastname = bindKeys.lastObject().toString;
I think that will return
anEmployee.lastName()
2006/10/24, Carter Wojcik <email@hidden>:
Thanks for the pointers.
It seems that bindingKeys() will return an array of
the known variables, which is close to what I would
like. Instead of the names of the variables, I would
like the actual objects that the variables represent.
I am creating my qualifier like the example below
(parts taken from API example):
Employee anEmployee; // Assume this exists.
EOQualifier myQualifier;
NSMutableArray args = new NSMutableArray();
args.addObject(anEmployee.lastName());
myQualifier =
EOQualifier.qualifierWithQualifierFormat
("lastName = %@", args);
Sometime after myQualifier is set, I would like to
reverse engineer the qualifier and return the
anEmployee.lastName() object.
Hope this makes more sense and is possible.
Carter
--- "Jerry W. Walker" <email@hidden> wrote:
> Hi, Carter,
>
> Check the method, "keyPathForBindingKey" in
> EOQualifier.
>
> Regards,
> Jerry
>
> On Oct 24, 2006, at 12:32 PM, Carter Wojcik wrote:
>
> > Hi All -
> >
> > I am creating an EOQualifier in a component that I
> am
> > then passing to a controller. The controller
> creates
> > a fetchspec using the qualifier and returns the
> > entities.
> >
> > I would like to deconstruct the fetch spec (in the
> > controller) by first getting the eoqualifier and
> then
> > the array of args that were supplied when the
> > qualifier was created. I can get the keys using
> > allQualifierKeys(), but does anyone know if it is
> > possible to access the actual objects that are
> being
> > used as the values to match?
> >
> > Thanks for your help.
> >
> > Carter
>
>
> --
> __ Jerry W. Walker,
> WebObjects Developer/Instructor for High
> Performance Industrial
> Strength Internet Enabled Systems
>
> email@hidden
> 203 278-4085 office
>
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
_______________________________________________
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