Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 13751 invoked from network); 3 May 2006 01:49:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 May 2006 01:49:07 -0000 Received: (qmail 88438 invoked by uid 500); 3 May 2006 01:49:05 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 88420 invoked by uid 500); 3 May 2006 01:49:05 -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 88409 invoked by uid 99); 3 May 2006 01:49:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2006 18:49:05 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 64.124.144.135 is neither permitted nor denied by domain of bryan@blackboard.com) Received: from [64.124.144.135] (HELO truman.dc.Blackboard.com) (64.124.144.135) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2006 18:49:04 -0700 Received: from rock.az.Blackboard.com ([10.20.2.44]) by truman.dc.Blackboard.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 2 May 2006 21:48:42 -0400 Received: from pima.az.Blackboard.com ([10.20.2.183]) by rock.az.Blackboard.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 2 May 2006 18:48:41 -0700 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C66E53.B4378143" Subject: RE: iBatis enhancements (Annotations and/or Dynamic beanutils support) Date: Tue, 2 May 2006 18:48:41 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: iBatis enhancements (Annotations and/or Dynamic beanutils support) thread-index: AcZuUjfUZqTlKEVDT2GKqPpo1msnjQAAEQ6Q From: "Brent Ryan" To: X-OriginalArrivalTime: 03 May 2006 01:48:41.0315 (UTC) FILETIME=[B4507330:01C66E53] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C66E53.B4378143 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Well, my usecase for beanutils is that I didn't want to have to create POJO's at all. I wanted my application and iBatis to figure out dynamically the data that I'm putting into a database. In this particular application I have a bunch of configuration information in a properties file and one of the configurations is "fieldNames". These field names correspond directly to the fieldNames in my POJO's. =20 If iBatis supported this then I would be able to specify something like this in my sqlmap: =20 =20 select EXTENDED_MERCHANT_SEQ.NEXTVAL as merchantId from DUAL insert into EXTENDED_MERCHANTS (MERCHANT_ID, NAME, CONTACT, EMAIL, PHONE, COMMENTS, VENDOR_ID, VENDOR_SITE_ID, INVOICE_EMAIL, EXTERNAL_MERCHANT) values (#merchantId#, #merchantName#, #merchantContact#, #merchantEmail#, #merchantPhone#, #merchantComments#, #vendorId#, #vendorSiteId#, #invoiceEmail#, #externalMerchant#) Basically, I'm lazy and I didn't want to have to create a POJO. It seems like I'm constantly having to enter the same field names over and over again... This would just be one place to eliminate that. =20 For annotations... I wasn't really sure other then I've seen some cool uses with the hibernate annotations. Maybe replace some of the result map configurations, default values, etc.. with annotations. Other then that, I'm not sure of another use for this... =20 Brent From: Jeff Butler [mailto:jeffgbutler@gmail.com]=20 Sent: Tuesday, May 02, 2006 6:15 PM To: user-java@ibatis.apache.org Subject: Re: iBatis enhancements (Annotations and/or Dynamic beanutils support) Regarding beanutils - this has been discussed on the list several times. The general feeling is that we want to keep the iBATIS dependancies to a minimum, so I don't think we'll see direct support of DynaBeans. You certainly could use a HashMap as a result class in iBATIS, and then create LazyDynaMap instances from the returned HashMaps. This would give you DynaBean behavior and would work directly with iBATIS today. Is there something about that approach that doesn't work for you?=20 =20 Regarding annotations - could you be more specific about what you're looking for? =20 Jeff Butler =20 On 5/2/06, Brent Ryan wrote:=20 Anyone know if Java 5 annotations or dynamic beanutils support will work in a future version of iBatis? =20 Brent =09 =09 This e-mail is intended only for the personal and confidential use of the recipient(s) named above.=20 It may include Blackboard confidential and proprietary information, and is not for redistribution.=20 =09 ------_=_NextPart_001_01C66E53.B4378143 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Well, my usecase for beanutils is that I didn't = want to=20 have to create POJO's at all.  I wanted my application and iBatis = to figure=20 out dynamically the data that I'm putting into a database.  In = this=20 particular application I have a bunch of configuration information in a=20 properties file and one of the configurations is "fieldNames".  = These field=20 names correspond directly to the fieldNames in my = POJO's.
 
If iBatis supported this then I would be = able to=20 specify something like this in my sqlmap:
 
<typeAlias alias=3D"merchant"=20 type=3D"org.apache.commons.beanutils.LazyDynaBean"/>
 
<insert id=3D"insertMerchant"=20 parameterClass=3D"merchant">
    <selectKey=20 resultClass=3D"int" keyProperty=3D"merchantId" > select=20 EXTENDED_MERCHANT_SEQ.NEXTVAL as merchantId from=20 DUAL</selectKey>
    insert into = EXTENDED_MERCHANTS=20 (MERCHANT_ID, NAME, CONTACT, EMAIL, PHONE, COMMENTS, VENDOR_ID, = VENDOR_SITE_ID,=20 INVOICE_EMAIL, EXTERNAL_MERCHANT)
    values = (#merchantId#,=20 #merchantName#, #merchantContact#, #merchantEmail#, #merchantPhone#,=20 #merchantComments#, #vendorId#, #vendorSiteId#, #invoiceEmail#,=20 #externalMerchant#)
  </insert>
Basically, I'm lazy and I didn't want to have = to create a=20 POJO.  It seems like I'm constantly having to enter the same field = names=20 over and over again...  This would just be one place to eliminate=20 that.
 
For annotations...  I wasn't really sure = other then=20 I've seen some cool uses with the hibernate annotations.  Maybe = replace=20 some of the result map configurations, default values, etc.. with=20 annotations.  Other then that, I'm not sure of another use for=20 this...
 
Brent

 From: Jeff = Butler=20 [mailto:jeffgbutler@gmail.com]
Sent: Tuesday, May 02, 2006 = 6:15=20 PM
To: user-java@ibatis.apache.org
Subject: Re: = iBatis=20 enhancements (Annotations and/or Dynamic beanutils=20 support)

Regarding beanutils - this has been discussed on the list several=20 times.  The general feeling is that we want to keep the iBATIS = dependancies=20 to a minimum, so I don't think we'll see direct support of = DynaBeans.  You=20 certainly could use a HashMap as a result class in iBATIS, and then = create=20 LazyDynaMap instances from the returned HashMaps.  This would give = you=20 DynaBean behavior and would work directly with iBATIS today.  = Is there=20 something about that approach that doesn't work for you?
 
Regarding annotations - could you be more specific about what = you're=20 looking for?
 
Jeff Butler

 
On 5/2/06, Brent Ryan=20 <bryan@blackboard.com> = wrote:=20
Anyone know if Java 5 = annotations or=20 dynamic beanutils support will work in a future version of=20 iBatis?
 
Brent

This e-mail is intended = only for the=20 personal and confidential use of the recipient(s) named above.
It = may=20 include Blackboard confidential and proprietary information, and is = not for=20 redistribution. =

This e-mail is intended = only for the personal and confidential use of the recipient(s) named = above.
It may include Blackboard confidential and proprietary = information, and is not for redistribution.

------_=_NextPart_001_01C66E53.B4378143--