Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 8201 invoked from network); 22 Dec 2008 11:12:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Dec 2008 11:12:43 -0000 Received: (qmail 56062 invoked by uid 500); 22 Dec 2008 11:12:41 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 56040 invoked by uid 500); 22 Dec 2008 11:12:40 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 56029 invoked by uid 99); 22 Dec 2008 11:12:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2008 03:12:40 -0800 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of todd.seiber@gmail.com designates 209.85.198.235 as permitted sender) Received: from [209.85.198.235] (HELO rv-out-0506.google.com) (209.85.198.235) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2008 11:12:33 +0000 Received: by rv-out-0506.google.com with SMTP id k40so1975965rvb.31 for ; Mon, 22 Dec 2008 03:12:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=Oipsh+6uYAf3wrHOq5NTg6CyK9P8rLOQ5fTUpktK+Qs=; b=L6X6mlZTWEHYzgntcIqOv1NoKNLQtpkojUaTSCEwtVgMPKBwt6NhWUY7bx3rBl5RQ3 p0K8U5L/hrI9n7Jo3DLub4xm84PMoXf+9YXracPdBvbUb7RxtDMwbWAcqcnXDB8E8UMg R0PST03B/TCjR4qV6kseW0WudRP/NOc3bd9FE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=d6O1qY1yjxn9VI4a20FrA/XlFpsa3JGA+xN7pgkFDjCNIaeDDRyDsyCvLZAHRaXGi7 EuFJCSrhwmiw8rcAEXy+0AYgQ4dN0RGPXlQQDUIMXfkAw9EsHvwZi///2tjPNfmf+kAL mMkmu/zlOS2+6A9EJEqii8TbM3NEp2tIp/97g= Received: by 10.141.197.14 with SMTP id z14mr3121945rvp.203.1229944332809; Mon, 22 Dec 2008 03:12:12 -0800 (PST) Received: by 10.140.112.2 with HTTP; Mon, 22 Dec 2008 03:12:12 -0800 (PST) Message-ID: <8ce7e61c0812220312m18493781s4db6c06fb51f8345@mail.gmail.com> Date: Mon, 22 Dec 2008 06:12:12 -0500 From: "Todd Seiber" To: users@jackrabbit.apache.org Subject: Re: OCM QueryManager - Results objects In-Reply-To: <21125828.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_36275_16453301.1229944332804" References: <21125828.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_36275_16453301.1229944332804 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Add a bean to the Property3 class to hold the parent object. Now create an object which extends AbstractBeanConverterImpl. In the getObject method get the parent (i.e. parentNode.getParent()). In your OCM definition map this bean object using converter="x.y.z.YourAbstractBeanConverterImpl" On Mon, Dec 22, 2008 at 5:48 AM, alarcher wrote: > > Hi, > > I'm using OCM QueryManager in a node structure like this : > > * Parent1 > - Property1 > - Property2 > * Property3 (it's a @Bean field) > - Property11 > - Property12 > > I wonder if there's a way to retrieve "Parent1" object while filtering on > Property11 of the Bean Property3 ? > > What I do is : > > org.apache.jackrabbit.ocm.query.QueryManager mgr = > ocm.getQueryManager(); > Filter filter = mgr.createFilter(Property3.class); > filter.addLike("Property11", "..."); > > org.apache.jackrabbit.ocm.query.Query query = > mgr.createQuery(filter); > Collection results = ocm.getObjects(query); > > Inevitably, the results are of type "Property3". > > Do you know if there is a way that ocm.getObjects returns parent objects ? > > > Thanks very much, > > Regards, > > Antoine Larcher > -- > View this message in context: > http://www.nabble.com/OCM-QueryManager---Results-objects-tp21125828p21125828.html > Sent from the Jackrabbit - Users mailing list archive at Nabble.com. > > -- Todd Seiber 830 Fishing Creek Rd. New Cumberland, PA 17070 h. 717-938-5778 c. 717-497-1742 e. todd.seiber@gmail.com ------=_Part_36275_16453301.1229944332804--