From: Amiel M. <bos...@gm...> - 2011-02-28 02:47:32
|
Ok I found this http://issues.objectstyle.org/jira/browse/WONDER-263?page=comments#action_13447looks to me this jira is in limbo. I made the adjustment on the EO generator templates and I'm happy Thank you all. Amiel On Mon, Feb 28, 2011 at 9:13 AM, Amiel Montecillo <bos...@gm...>wrote: > Finally got to try this out and still no joy for me. I forgot to mention > that "Status" enum is a static inner enum of GovURLStatus. > > class GovURLStatus extends _GovURLStatus { > public static enum Status { INITIAL, VALID, INVALID } > ...... > } > > If valueClassName: com.ods.wo.bids.db.urltracker.GovURLStatus.Status - i > get adaptorValueType: unable to load class named > 'com.ods.wo.bids.db.urltracker.GovURLStatus.Status' for attribute name on > entity GovURLStatus > > If valueClassName: com.ods.wo.bids.db.urltracker.GovURLStatus$Status - i > get compile time errors: The nested type > com.ods.wo.bids.db.urltracker.GovURLStatus$Status cannot be referenced using > its binary name > > This leaves me with just one more option that Dr. Wardle pointed out. Doc, > did you mean > http://wiki.objectstyle.org/confluence/display/WOL/EOGenerator+Templates+and+Additions > ? > > Thanks, > Amiel > > > On Sat, Feb 26, 2011 at 4:30 PM, Mark Wardle <ma...@wa...> wrote: > >> NB: when using $ to refer to an enum defined within a class, you will need >> to update your WOLips templates. >> >> I think there's a page on the wiki but I have limited connection at the >> moment. >> >> >> >> -- >> Dr. Mark Wardle >> Specialist registrar, Neurology >> (Sent from my mobile) >> >> >> On 26 Feb 2011, at 01:49, Amiel Montecillo <bos...@gm...> wrote: >> >> Thank you Johann, >> >> I think I had tried setting the valueClassName to the complete class name >> but I think I was still setting the value type. I'll try your solution when >> I get back in the office. (it's weekend here and you have given me a reason >> not to sleep :P) >> >> Thanks again! >> Amiel >> >> On Fri, Feb 25, 2011 at 6:44 PM, Johann Werner < <jw...@oy...> >> jw...@oy...> wrote: >> >>> Hi Amiel, >>> >>> you should use the valueClassName instead of valueType and add the >>> complete package name: >>> >>> { >>> columnName = name; >>> name = name; >>> prototypeName = javaEnum; >>> valueClassName = >>> "com.ods.wo.bids.db.urltracker.GovURLStatus.Status"; >>> } >>> >>> jw >>> >>> <entity_modeler.png> >>> >>> Am 25.02.2011 um 09:37 schrieb Amiel Montecillo: >>> >>> Greetings. >>> >>> I am having difficulty getting the prototype javaEnum to work. I have >>> this model >>> >>> { >>> attributes = ( >>> { >>> allowsNull = Y; >>> columnName = description; >>> name = description; >>> prototypeName = varchar255; >>> }, >>> {columnName = displayName; name = displayName; prototypeName = >>> varchar50; }, >>> {allowsNull = N; name = id; prototypeName = id; }, >>> { >>> columnName = name; >>> name = name; >>> *prototypeName = javaEnum;* >>> valueType = "GovURLStatus.Status"; <- this is a static >>> declaration in com.ods.wo.bids.db.urltracker.GovURLStatus >>> } >>> ); >>> attributesUsedForLocking = (description, displayName, id, name); >>> className = "com.ods.wo.bids.db.urltracker.GovURLStatus"; >>> classProperties = (description, displayName, name); >>> externalName = GovURLStatus; >>> fetchSpecificationDictionary = {}; >>> name = GovURLStatus; >>> primaryKeyAttributes = (id); >>> relationships = ( >>> { >>> deleteRule = EODeleteRuleDeny; >>> destination = GovURLEntity; >>> isToMany = Y; >>> joinSemantic = EOInnerJoin; >>> joins = ({destinationAttribute = govURLStatusID; >>> sourceAttribute = id; }); >>> name = urlEntities; >>> } >>> ); >>> } >>> >>> I don't any problems in eclipse's "Problems" view but when I do a select >>> I get this exception: >>> >>> Database Exception occured: com.webobjects.foundation.NSForwardException[java.lang.NoSuchMethodException] Class java.lang.Enum does not implement >>> method valueOf:java.lang.NoSuchMethodException: Class java.lang.Enum >>> does not implement method valueOf >>> >>> >>> Can anybody help me out? >>> >>> >>> Thanks, >>> >>> Amiel >>> >>> ------------------------------------------------------------------------------ >>> Free Software Download: Index, Search & Analyze Logs and other IT data in >>> >>> Real-Time with Splunk. Collect, index and harness all the fast moving IT >>> data >>> generated by your applications, servers and devices whether physical, >>> virtual >>> or in the cloud. Deliver compliance at lower cost and gain new business >>> insights. <http://p.sf.net/sfu/splunk-dev2dev> >>> http://p.sf.net/sfu/splunk-dev2dev_______________________________________________ >>> Wonder-disc mailing list >>> <Won...@li...>Won...@li... >>> <https://lists.sourceforge.net/lists/listinfo/wonder-disc> >>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >>> >>> >>> >>> >> >> ------------------------------------------------------------------------------ >> Free Software Download: Index, Search & Analyze Logs and other IT data in >> Real-Time with Splunk. Collect, index and harness all the fast moving IT >> data >> generated by your applications, servers and devices whether physical, >> virtual >> or in the cloud. Deliver compliance at lower cost and gain new business >> insights. http://p.sf.net/sfu/splunk-dev2dev >> >> _______________________________________________ >> Wonder-disc mailing list >> Won...@li... >> https://lists.sourceforge.net/lists/listinfo/wonder-disc >> >> > |