Great, Thanks looks nice.

On 2010/12/17, at 23:00, Ricardo J. Parada wrote:

> 
> Oh just when I think I'm building qualifiers in the coolest possible manner.  
> :-) :-)
> 
> Thanks for sharing... 
> 
> 
> On Dec 17, 2010, at 3:54 PM, John Huss wrote:
> 
>> If anyone is interested, I recently came up with an EO template enhancement 
>> that allows for much better keypath creation using ERXKeys.  It works by 
>> creating an inner class in each eo class that exposes methods for appending 
>> each of it's keys to a key path that is being built. Then you can construct 
>> key paths like this: 
>> 
>>      MovieRole.path.talent().photo().photo().key()    // returns 
>> talent.photo.photo 
>> instead of
>>      MovieRole.TALENT.dot(Talent.PHOTO).dot(TalentPhoto.PHOTO).key()
>> 
>> 
>> OR
>> 
>>      TalentPhoto.path.talent().roles().roleName().eq("Actor")      // 
>> returns qualifier for talent.roles.roleName 
>> instead of
>>      TalentPhoto.TALENT.dot(Talent.ROLES).dot(Role.ROLE_NAME).eq("Actor")
>> 
>> 
>> This is an improvement for a few reasons:
>> 1) More readable
>> 2) Guarantees the validity of the whole key path, whereas before only the 
>> individual parts were checked
>> 3) Code completion the whole way through eliminates thinking
>> 4) More closely matches the syntax used to access the actual values
>> 
>> To add this functionality, paste the attached snippet into your own copy of 
>> the _WonderEntity.java template (mine is right after the class declaration).
>> 
>> Note: this requires a fairly recent version Wonder to work correctly. 
>> 
>> John
>> <key path template.txt> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com
>> 
>> This email sent to [email protected]
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/ken%40ksroom.com
> 
> This email sent to [email protected]



Thank you

--------------------------------------------------------
K's ROOM      (ISHIMOTO Ken)
--------------------------------------------------------
[E-Mail]  <[email protected]>
[iChat:]   <[email protected]>
[HP]          http://www.ksroom.com/
_____________________________________________________________________
This e-mail has not been scanned for viruses because it was written on an Mac,
and there are NO Viruses on an Apple Computer.
For further information visit http://www.apple.com



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to