Would it be possible to have these templates available on the Wiki
(http://wiki.objectstyle.org/confluence/display/WOL/*EOGenerator
+Templates)?
I could really use the fetch functionality that you've been discussing.
Thanks,
Dave
On Jan 25, 2008, at 9:28 AM, Oswaldo Bueno wrote:
> Mike,
> I also tested here and it worked great.
>
> Thanks a lot.
>
> Cheers,
> Bueno
>
> On Jan 25, 2008 8:23 AM, Fabian Peters <lists.fabia..-lumo.com>
> wrote:
>> Mike,
>>
>> Thanks a lot indeed! I just checked this with tonight's build and it
>> works like a charm! Velogen now does everything the old eogen did for
>> me and more, thanks to the model documentation feature. Very, very
>> cool!
>>
>> cheers,
>>
>> Fabian
>>
>> Am 24.01.2008 um 20:40 schrieb David LeBer:
>>
>>
>>>
>>> On 24-Jan-08, at 12:58 PM, Mike Schrag wrote:
>>>
>>>> It worked for very small values of "working" ... Um yeah I'm not
>>>> sure how that ever worked, but I know under certain cases it DID.
>>>> Anyyyyhooo ... The "actually working" version is now committed, and
>>>> I added a shortcut on EOQualifierBinding that you can just
>>>> call .javaClassName on it directly rather than
>>>> attributePath.javaClassName.
>>>
>>>
>>> Hoorah!
>>>
>>> As of WOLips 3.3.4778 this chunk of velogen template:
>>>
>>> #foreach ($fetchSpec in $entity.sortedFetchSpecs)
>>> public static NSArray fetch${fetchSpec.capitalizedName}
>>> (EOEditingContext ec#foreach ($binding in
>>> $fetchSpec.distinctBindings), ${binding.javaClassName} $
>>> {binding.name}Binding#end) {
>>> #if ($fetchSpec.distinctBindings.size() > 0)
>>> NSMutableDictionary bindings = new NSMutableDictionary();
>>> #foreach ($binding in $fetchSpec.distinctBindings)
>>> if (${binding.name}Binding != null) {
>>> bindings.setObjectForKey(${binding.name}Binding, "$
>>> {binding.name}");
>>> }
>>> #end
>>> #end
>>> return EOUtilities.objectsWithFetchSpecificationAndBindings
>>> (ec, "$
>>> {entity.name}", "${fetchSpec.name}", #if
>>> ($fetchSpec.distinctBindings.size() > 0) bindings);#else null);
>>> #end
>>>
>>> }
>>> #end
>>>
>>> With the qualifiers:
>>>
>>> (userName = $userName) and (password = $password)
>>>
>>> Generates this:
>>>
>>> public static NSArray
>>> fetchUserForUsernameAndPassword(EOEditingContext ec, String
>>> passwordBinding, String userNameBinding) {
>>> NSMutableDictionary bindings = new NSMutableDictionary();
>>> if (passwordBinding != null) {
>>> bindings.setObjectForKey(passwordBinding, "password");
>>> }
>>> if (userNameBinding != null) {
>>> bindings.setObjectForKey(userNameBinding, "userName");
>>> }
>>> return EOUtilities.objectsWithFetchSpecificationAndBindings
>>> (ec,
>>> "User", "UserForUsernameAndPassword", bindings);
>>> }
>>>
>>> Very happy! Thanks a tonne Mike!
>>>
>>> ;david
>>>
>>> --
>>> David LeBer
>>> Codeferous Software
>>> 'co-def-er-ous' adj. Literally 'code-bearing'
>>> site: http://codeferous.com
>>> blog: http://davidleber.net
>>> profile: http://www.linkedin.com/in/davidleber
>>> --
>>> Toronto Area Cocoa / WebObjects developers group:
>>> http://tacow.org
>>>
>>>
>>
>>
>
>
>
> --
> ----------------------------------------------------------------------
> -------------------
> Oswaldo V. C. Bueno - http://bueno.carpintaria.com
> Carpintaria do Software - http://www.carpintaria.com
>
>
This archive was generated by hypermail 2.0.0 : Fri Jan 25 2008 - 10:04:40 EST