• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: [WO45] Problem with a new EOQualifier subclass in Java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [WO45] Problem with a new EOQualifier subclass in Java


  • Subject: RE: [WO45] Problem with a new EOQualifier subclass in Java
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 10 Mar 2003 19:14:51 -0800

Here are the docs describing how to create a sub-class in Obj-C:
http://developer.apple.com/techpubs/webobjects/WebObjects_4.5/System/Library
/Frameworks/EOControl.framework/ObjC_classic/Classes/More/EOQualifier.html#B
CCDDGCH

Specifically, "Subclasses used to evaluate objects in memory must implement
the EOQualifierEvaluation protocol. Subclasses used to generate SQL queries
must conform to the EOQualifierSQLGeneration protocol."

EOQualifierEvaluation:
http://developer.apple.com/techpubs/webobjects/WebObjects_4.5/System/Library
/Frameworks/EOControl.framework/ObjC_classic/Protocols/EOQualifierEvaluation
.html

EOQualifierSQLGeneration
http://developer.apple.com/techpubs/webobjects/WebObjects_4.5/System/Library
/Frameworks/EOAccess.framework/ObjC_classic/Protocols/EOQualifierSQLGenerati
on.html

Those define
- (BOOL)evaluateWithObject:object
- (NSString *)sqlStringForSQLExpression:(EOSQLExpression *)sqlExpression
- (EOQualifier *)schemaBasedQualifierWithRootEntity:(EOEntity *)entity

Have you implemented all of those methods?  That is all I can think of for
now, my Obj-C is getting a bit rusty.  :-(


Chuck


At 09:36 PM 10/03/2003 -0500, Labrie, Francis (Liste de distribution) wrote:
>Hi,
>
>
>Chuck Hill wrote:
>> I don't use WODisplayGroups but...  The docs state, "It
>> collects objects from an EODataSource, filters and sorts
>> them, and maintains a selection in the filtered subset."
>>
>> That is not very clear, but it strongly suggests that
>> WODisplayGroup does in memory filtering rather than
>> refetching from the DB.
>
>I though that WODisplayGroup did memory filtering too,
>so I've tried to implement EOQualifierEvaluation interface
>and add evaluateWithObject(Object) method with debug output
>within. But it still complains with the
>NSInvalidArgumentException exception:
>
>
>NSInvalidArgumentException: ***
>-qualifierMigratedFromEntity:relationshipPath: cannot be sent to an abstract
>object of class com/genilog/webobjects/eocontrol/SoundExQualifier: Create a
>concrete instance!
>
>
>I've define qualifierMigratedFromEntity(EOEntity, String)
>method too with debug output, but no one are called. The fetch
>is done on the database, the ODBCChannel receive all the results
>and the internal transaction is commited. But then the
>exception is fired.
>
>What does it mean: "... cannot be sent to an abstract object of
>class..." and "Create a concrete instance!"? My SoundExQualifier
>is not an abstract class, and it doesn't return any abstract
>EOQualifier class! I suspect I need to provide another method,
>but I can't figure what is it... And I don't have access any
>native code of WO4.5 EOQualifier classes...
>
>Any idea? What's the magic trick to make WODisplayGroup happy
>with my new SoudExQualifier?
>
>
>> Labrie, Francis (Liste de distribution) wrote:
>> > I've developed a new EOQualifier subclass in Java called
>> > SoundExQualifier that permits SoundEx comparison on a DBMS
>> > that support it like Microsoft SQL Server (i.e.
>> > "DIFFERENCE(keyPath, value) >= similarityLevel").
>> >
>> > When I use this qualifier with a simple
>> > EOFetchSpecification, it works like a charm.
>> >
>> > But I can't use it with a WODisplayGroup. When the
>> > WODisplayGroup method qualifyDataSource() is called, an
>> > exception is thrown:
>> >
>> >
>> > NSInvalidArgumentException: ***
>> > -qualifierMigratedFromEntity:relationshipPath: cannot be
>> > sent to an abstract object of class
>> > com/genilog/webobjects/eocontrol/SoundExQualifier: Create
>> > a concrete instance!
>> >
>> >
>> > Why do I get a such exception? I don't implements
>> > EOQualifierEvaluation because I don't want to support in
>> > memory fetch, so there is no evaluateWithObject(Object)
>> > method. I've tried to define a
>> > qualifierMigratedFromEntity(EOEntity, String) method
>> > too that returns a SoundExQualifier clone, but it doesn't
>> > work. Can anyone help me?
>>
>> --
>> Chuck Hill                                 email@hidden
>> Global Village Consulting Inc.
>> http://www.global-village.net
>

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >RE: [WO45] Problem with a new EOQualifier subclass in Java (From: "Labrie, Francis (Liste de distribution)" <email@hidden>)

  • Prev by Date: RE: [WO45] Problem with a new EOQualifier subclass in Java
  • Next by Date: Re: [WO45] Problem with a new EOQualifier subclass in Java
  • Previous by thread: RE: [WO45] Problem with a new EOQualifier subclass in Java
  • Next by thread: Re: [WO45] Problem with a new EOQualifier subclass in Java
  • Index(es):
    • Date
    • Thread