[OS-JIRA] Created: (WOL-677) Provide access to unbound fetch spec attributes for EOGeneration

From: Fabian Peters (JIRA) ("Fabian)
Date: Tue Nov 27 2007 - 11:25:38 EST

  • Next message: James Cicenia: "Trying to get this project to run - java.lang.NoClassDefFoundError: org/apache/xerces/parsers/SAXParser"

    Provide access to unbound fetch spec attributes for EOGeneration
    -----------------------------------------------------------------

                     Key: WOL-677
                     URL: http://issues.objectstyle.org/jira/browse/WOL-677
                 Project: WOProject/WOLips
              Issue Type: New Feature
              Components: wolips
                Reporter: Fabian Peters
                Priority: Minor

    The Rubicode EOGenerator allowed for template markup like this:

            public static NSArray fetch<$FetchSpec.niceName$>( EOEditingContext ec<$foreach Binding FetchSpec.bindings do2$>, <$Binding.codeType$><$Binding.name$>Binding<$endforeach do2$> ) {
                    NSArray result = null;
    <$if FetchSpec.bindings..ount > 0 $>
                    NSMutableDictionary bindings = new NSMutableDictionary(<$FetchSpec.bindings..ount$>);<$foreach Binding FetchSpec.bindings do2$>
                    if( <$Binding.name$>Binding != null )
                            bindings.setObjectForKey(<$Binding.name$>Binding, "<$Binding.name$>");<$endforeach do2$><$endif$>
                    try {
                            result = EOUtilities.objectsWithFetchSpecificationAndBindings(
                                    ec,
                                    "<$name$>",
                                    "<$FetchSpec.fetchName$>",
                                    <$if FetchSpec.bindings..ount > 0$>bindings<$else$>null<$endif$> );
                    } catch( EOObjectNotAvailableException e ) {
                            result = new NSArray();
                    }
                    return result;
            }

    Resulting in something like:

        public static Order fetchOneByShippingMethod( EOEditingContext ec, com.elumo.store.eos.ShippingMethod shippingMethodBinding ) {
            Order result = null;
            NSMutableDictionary bindings = new NSMutableDictionary(1);
            if( shippingMethodBinding != null )
                bindings.setObjectForKey(shippingMethodBinding, "shippingMethod");
                try {
                    result = (Order) EOUtilities.objectWithFetchSpecificationAndBindings(
                        ec,
                        "Order",
                        "byShippingMethod",
                        bindings );
                } catch( EOObjectNotAvailableException e ) {}
            return result;
        }

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.objectstyle.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Tue Nov 27 2007 - 11:27:09 EST