• 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
Need help in building a pretty complex EOQualifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help in building a pretty complex EOQualifier


  • Subject: Need help in building a pretty complex EOQualifier
  • From: Markus Ruggiero <email@hidden>
  • Date: Thu, 12 Dec 2013 14:56:16 +0100

On first sight it looks pretty simple, but the more I think of a solution the more confused I become. Can someone help me build a qualifier for entity "Document" please:

Model:

Document <--->>DocumentText<<--->Text

DocumentText is NOT a simple many2many join but has its own attributes. When I create a Document I assign a pre-defiend set of Text objects to it. This means I create a number of DocumentText objects each pointing to one Text. These DocumentText objects are presented to the user as a list of "attributes" of a Document. The user then specifies a textual comment (for the field DocumentText.COMMENT_KEY) and a status value (for DocumentText.STATUS_KEY) on any one or more of these DocumentText objects. Upon save I update those 2 or 3 or 4... DocumentText objects accordingly. For many of them the user does not enter anything (status is a known default, comment is empty). This all works.

Now comes the qualifier to retrieve Documents: The user sees a D2WQueryPage for the document properties with an embedded property level query component that presents the full list of possible DocumentText objects with their status and comment fields. A typical scenario could be: the user wants to enter a comment query for the second assigned text (that's Text "A") and/or picks a query value for the status of the 7th assigned text (this could be Text "B"). Upon executing the query the user expects to retrieve a list of Documents that fulfill all given criteria. In this example the user wants to see all Documents where the assignment to Text "A" has comment "x" AND the assignment to Text "B" has status "y".

I have this working for the case where the user only gives one search criterium but I cannot figure out how to construct the qualifier for the combination. An OR qualifier returns all Documents where any one DocumentText is satisfied whereas an AND qualifier returns nothing. I do understand those two cases. Mind you the top level entity must be Document, because that's what the user works with and queries against. In my property level query component I have set-Methods for the status and the comment values on the DocumentText loopvar. These methods retrieve the displayGroup qualifier and manipulate it. But not knowing how the final qualifier should look I am at a loss.

Thanks for any help
---markus---




Markus Ruggiero
email@hidden
Check out the new book about Project Wonder and WebObjects on http://learningthewonders.com/







 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Need help in building a pretty complex EOQualifier
      • From: David Avendasora <email@hidden>
    • Re: Need help in building a pretty complex EOQualifier
      • From: Alexander Spohr <email@hidden>
  • Prev by Date: Re: java.lang.IllegalStateException: Trying to check out a session twice in one RR loop
  • Next by Date: Re: Need help in building a pretty complex EOQualifier
  • Previous by thread: How to expand a tree node in AjaxTree
  • Next by thread: Re: Need help in building a pretty complex EOQualifier
  • Index(es):
    • Date
    • Thread