Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 95746 invoked from network); 12 May 2008 13:53:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 May 2008 13:53:47 -0000 Received: (qmail 76194 invoked by uid 500); 12 May 2008 13:53:48 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 75543 invoked by uid 500); 12 May 2008 13:53:47 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 75532 invoked by uid 99); 12 May 2008 13:53:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 May 2008 06:53:47 -0700 X-ASF-Spam-Status: No, hits=-6.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Denis.Kezerashvili@gs.com designates 206.230.49.180 as permitted sender) Received: from [206.230.49.180] (HELO mxeod01.gs.com) (206.230.49.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 May 2008 13:52:58 +0000 X-IronPort-AV: E=Sophos;i="4.27,473,1204520400"; d="scan'208,217";a="354269321" Received: from unknown (HELO mxpcd01-public.ny.fw.gs.com) ([148.86.97.78]) by mxeod01.idz.gs.com with ESMTP; 12 May 2008 09:53:11 -0400 From: "Kezerashvili, Denis" X-sendergroup: RELAYLIST Received: from gsmrjhp01es.firmwide.corp.gs.com ([138.8.186.231]) by cd01-mxp-vip-prod.ny.fw.gs.com with ESMTP; 12 May 2008 09:53:12 -0400 Received: from GSMBCDP25ES.firmwide.corp.gs.com ([139.172.130.203]) by gsmrjhp01es.firmwide.corp.gs.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 12 May 2008 09:53:11 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8B437.842D958D" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Problem exposing protected setters for iBatis Date: Mon, 12 May 2008 09:53:11 -0400 Message-ID: <9A1FB294C6BAB244BF5EC1A90DD58070041823AD@gsmbcdp25es.firmwide.corp.gs.com> In-Reply-To: <536e8800805091504j533a763j1d7763a05aa3a9f0@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem exposing protected setters for iBatis Thread-Index: AciyIMmz1bKmyOJKSKSYY8nT9QLfAACFUMsg References: <9A1FB294C6BAB244BF5EC1A90DD58070041823A7@gsmbcdp25es.firmwide.corp.gs.com> <9A1FB294C6BAB244BF5EC1A90DD58070041823AB@gsmbcdp25es.firmwide.corp.gs.com> <536e8800805091504j533a763j1d7763a05aa3a9f0@mail.gmail.com> To: X-OriginalArrivalTime: 12 May 2008 13:53:11.0685 (UTC) FILETIME=[845B8350:01C8B437] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C8B437.842D958D Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thank you Koka for the link. =20 I am actually well aware of the fact that iBATIS uses reflection to call setters. And yes it works fine with private setters. It also works fine with protected setters for the child classes in the same package. So if you have User class extending Entity class that has a protected void setId(); it will work for User class in iBATIS.=20 The problem arises when your User class is NOT in the same package as your Entity class. Apparently the reflection calls are made on User class and for some reason it has no access to the setId() method inherited from the Entity class. If the reflection call was made on Entity instead it would've worked, but I do not think iBATIS is doing that. Or maybe it can do that, but it has to be configured somehow to make reflection calls on the parent class.=20 =20 Does anybody know how to do that, or if it's even possible? =20 Any input would be greatly appreciated ________________________________ From: Nicholoz Koka Kiknadze [mailto:kiknadze@gmail.com]=20 Sent: Friday, May 09, 2008 6:05 PM To: user-java@ibatis.apache.org Subject: Re: Problem exposing protected setters for iBatis =09 =09 Well, here's thread discussing same problem, and it seems private setId() should work =09 =09 http://www.mail-archive.com/user-java@ibatis.apache.org/msg08629.html =09 ------_=_NextPart_001_01C8B437.842D958D Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Thank you Koka for the = link.
 
I am actually well aware of the fact that = iBATIS uses=20 reflection to call setters. And yes it works fine with private setters. = It also=20 works fine with protected setters for the child classes in the same = package. So=20 if you have User class extending Entity class that has a = protected=20 void setId(); it will work for User class in iBATIS. =
The problem arises when your User class is=20 NOT in the same package as your Entity class. = Apparently the=20 reflection calls are made on User class and for some reason it has no = access to=20 the setId() method inherited from the Entity class. If the reflection = call was=20 made on Entity instead it would've worked, but I do not think iBATIS is = doing=20 that. Or maybe it can do that, but it has to be configured somehow to = make=20 reflection calls on the parent class.
 
Does anybody know how to do that, or if it's = even=20 possible?
 
Any input would be greatly=20 appreciated


From: Nicholoz Koka Kiknadze=20 [mailto:kiknadze@gmail.com]
Sent: Friday, May 09, 2008 6:05 = PM
To: user-java@ibatis.apache.org
Subject: Re: = Problem=20 exposing protected setters for iBatis

Well, here's thread discussing same problem, and it seems = private=20 setId() should work

http://www.mail-archive.com/user-java@ibatis.apache.org/msg08629.ht= ml
------_=_NextPart_001_01C8B437.842D958D--