Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 83547 invoked from network); 7 Mar 2011 10:38:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Mar 2011 10:38:35 -0000 Received: (qmail 9066 invoked by uid 500); 7 Mar 2011 10:38:35 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 8932 invoked by uid 500); 7 Mar 2011 10:38:35 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 8923 invoked by uid 99); 7 Mar 2011 10:38:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2011 10:38:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sberyozkin@gmail.com designates 209.85.161.41 as permitted sender) Received: from [209.85.161.41] (HELO mail-fx0-f41.google.com) (209.85.161.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2011 10:38:27 +0000 Received: by fxm5 with SMTP id 5so4669258fxm.0 for ; Mon, 07 Mar 2011 02:38:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=WJae7gM9fyYSmu/Cu/2zZ6p0QRLtmkKycCt5FnQ6w70=; b=GJPm0uKwygBNvMRiKqR7We8WI5qRQtxq5TzAWfgQMycbx4YWtWHdPc/yPGvCmO23Cm fNPrgu0ojsiShvylfCdsU2pvwHfq7a7c35Yj4Q+OSRRq0RRMA2+aaN7r5rzv56tG/2rf 4cKGX46QYpkKqBU+i0Wkngc1F2+nUM06Sdt4w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Zwgl92PgLdv1xfhjlE7ZnG85a2jsrMyOfnkGFM7TQ5TDrSOlmH5koLkifUNwXBVKDQ fk2Uc1+h9MoHX0iWDmg3euTPuq5qt39X8Q+3JAoKROzukENhKwIsTE05vt7EyZanZgOS to4GM7guI/TTqLVRPFu2crexJK3wvnZpnVC0c= MIME-Version: 1.0 Received: by 10.223.79.78 with SMTP id o14mr4526319fak.110.1299494286696; Mon, 07 Mar 2011 02:38:06 -0800 (PST) Received: by 10.204.51.69 with HTTP; Mon, 7 Mar 2011 02:38:06 -0800 (PST) In-Reply-To: References: <1296725481546-3369018.post@n5.nabble.com> <1297179182856-3376071.post@n5.nabble.com> <1297195031591-3376520.post@n5.nabble.com> <1299367309139-3411039.post@n5.nabble.com> <1299447405518-3411767.post@n5.nabble.com> Date: Mon, 7 Mar 2011 10:38:06 +0000 Message-ID: Subject: Re: SeachConditionBuilder for CXF JAX-RS clients From: Sergey Beryozkin To: dev@cxf.apache.org Cc: Andrzej Michalec Content-Type: multipart/alternative; boundary=00248c176ab458a439049de2173a X-Virus-Checked: Checked by ClamAV on apache.org --00248c176ab458a439049de2173a Content-Type: text/plain; charset=ISO-8859-1 Sorry for the possible noise, seems like the message is being rejected if it contains Nabble links... On Mon, Mar 7, 2011 at 10:33 AM, Sergey Beryozkin wrote: > Hi Andy > > On Sun, Mar 6, 2011 at 9:36 PM, Andrzej Michalec < > andrzej.michalec@gmail.com> wrote: > >> >> Sergey Beryozkin-5 wrote: >> > >> > I'm concerned about it. >> > I've seen the relevant JAXRSClientSeverBookTest being disabled and I'm >> > honestly not sure why >> > given >> > _s=id==2 >> > >> >> You could use this query on "id==2" and it worked (you have made >> unit/system >> tests). The trick is that when one would make up a query with "name==CXF*" >> only, without id, this certailny fails since id is internally set to zero >> instead of null > > > If we start enforcing it then I'm concerned it would make the search > extension limited. > The match should be attempted at the individual property level only, that > is in your example, only a 'name' property should be compared, or > SimpleSearchCondition should only be initialized with a single internal > condition only. > > I'm not sure at all if we can expect 'real' beans containing non-primitive > properties only and thus we probably can be 'assured' people won't be using > SearchCondition.findAll/isMet if for that to work they have to change them > to meet the new restriction... > > Actually, I added a test to the JAXRSAtomPushLoggingSpringTest which > searches the log records using the queries like 'level==INFO,level==WARN'. > And for that to work I had to make the change to FIQLParser to ensure that > SimpleSearchCondition was only initialized with the map of properties which > were specified in the query given that LogRecord has the dozen (or so :-)) > of other properties. Thus I'm not sure why to fail the match if the > property, even it is primitive, is not even checked ? > > >> Since unit/system tests accidentally used all primitve type >> fields in queries (I mean "id") everything worked fine. Now the tests are >> broken (and disabled) because I added sanity check inside >> SimpleSearchCondition which denies work it type T contains primitive >> types. >> If Book class had "id" type of Integer, instead of int, it would work as a >> charm. But it makes too mach of a hastle and as I confirmed it is >> unnecessary constraint I overlooked, so I just need to take care of the >> code >> I committed and replace comparison mechanism in SimpleSearchCondition, >> plus >> wire it back in FiqlParser. >> >> Are you saying you are ok with reverting the change ? If yes then +1. > > >> Sergey, do you plan this featrue part of 2.4 release, right? Just let me >> know what deadline is to see if I can handle this change on time. >> >> > SearchConditionBuilder will be part of the 2.4 release so it will be a new > feature, or may be rather the enhancement toward making the search feature > more complete as it will facilitate using FIQL on the client side... > > >> Regarding user perspective and how SearchConditionBuilder is a factory for >> builders, maybe in future other than FIQL -- sounds reasonable, will take >> care of it too. >> >> Sound good. I'd be glad if we could hide initial query() and introduce > some primitive factory mechanism. > May be we can make SearchConditionBuilder an abstract class ? Have an > internal FiqlSearchConditionBuilder as the default instance ? And have > SearchConditionBuilder.instance() and SearchConditionBuilder.instance(String > language), with the former delegating to the latter as instance("FIQL") ? > > thanks, Sergey > > >> cheers, >> -andy. >> >> --00248c176ab458a439049de2173a--