Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 96678 invoked from network); 17 Oct 2008 06:58:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Oct 2008 06:58:50 -0000 Received: (qmail 76689 invoked by uid 500); 17 Oct 2008 06:58:45 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 76674 invoked by uid 500); 17 Oct 2008 06:58:45 -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 76663 invoked by uid 99); 17 Oct 2008 06:58:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Oct 2008 23:58:45 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.247.21.92] (HELO mail.local.wis.nl) (83.247.21.92) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 17 Oct 2008 06:57:34 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C93025.9A46E852" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: 2.3.4.726 and XmlConverter Date: Fri, 17 Oct 2008 08:57:29 +0200 Message-ID: <50CA25BD6EEA954FA592C097399942E319CF4EA9@CM1.wis.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: 2.3.4.726 and XmlConverter Thread-Index: Ackv/XfOSX4QGGNYSk2rBSZRAIoVdAAFK9RwAATOvoA= References: <0MKxQS-1Kqh9P3yhg-0002id@mrelayeu.kundenserver.de> From: "Niels Beekman" To: X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C93025.9A46E852 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable You could easily do this with properties, unless you are connecting to databases on the fly. Search the archives for some examples of this. We use this for purposes similar like yours. =20 Niels ________________________________ From: Zsolt Koppany [mailto:zkoppanylist@intland.com]=20 Sent: Friday, October 17, 2008 6:41 AM To: user-java@ibatis.apache.org Subject: RE: 2.3.4.726 and XmlConverter =20 I'm not sure whether my problem is clear. Please check the code below (just an example). The expression ${INT_NULL_FIELD_VALUE} has different value on different database thus during the xml file is read we transfer the expression into a database dependent string. =20 I understand that we could do that setting the property from Dao but in this case the Dao would be database dependent what we don't like. =20 Zsolt =20 =20 Zsolt=20 ________________________________ From: Clinton Begin [mailto:clinton.begin@gmail.com]=20 Sent: Friday, October 17, 2008 4:09 AM To: user-java@ibatis.apache.org Subject: Re: 2.3.4.726 and XmlConverter =20 I don't think Zsolt is talking about the XML results/parameters support in iBATIS. XMLConverter was a class used to literally translate iBATIS 1.x mapping files into iBATIS 2.x mapping files using XSLT. It allowed either runtime conversion or batch conversion. =20 =20 Zsolt could use the old version to do the one-time conversion of all of his files if he wants, but it sounds like he is extending the class for some reason, in which case he could just grab the code and make it his own. =20 Clinton On Thu, Oct 16, 2008 at 5:02 PM, wrote: As a suggestion Zsolt, iBatis does OR mapping extremely well. What you are looking for is something that will map Objects into XML extremely well. Why not take a look at XStream by thoughtworks. I'm using their library for several projects pertaining to Object -> XML and it handles them exceptionally well. And by utilizing a library like this it will give you a clean separation of concern as well as better control over the XML that you want to generate.=20 http://xstream.codehaus.org/=20 "Clinton Begin" =20 10/16/2008 03:42 PM=20 Please respond to=20 user-java@ibatis.apache.org To user-java@ibatis.apache.org=20 cc =20 Subject Re: 2.3.4.726 and XmlConverter =20 =20 =20 =20 =20 =20 Zsolt,=20 This feature is really old and was only there to support 1.x clients during the transition to 2.x. If you're still have 1.x maps, it might be a good time to move them. Otherwise, consider it a deprecated feature. Thus, the long-term solution is for you to either adopt the code as your own, or migrate your SQL mapping files.=20 cheers Clinton On Thu, Oct 16, 2008 at 2:56 PM, Zsolt Koppany wrote:=20 Larry, are there better options that will work long term? What is the recommended way today? Zsolt=20 > -----Original Message----- > From: Larry Meadors [mailto:larry.meadors@gmail.com] > Sent: Thursday, October 16, 2008 3:55 PM > To: user-java@ibatis.apache.org > Subject: Re: 2.3.4.726 and XmlConverter >=20 > Two options: > > - stick with the older version of ibatis that has all the parts you need > - extract the parts you need from the older version of ibatis and use > them alongside the new release > > Larry =20 ------_=_NextPart_001_01C93025.9A46E852 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

You could easily do this with = properties, unless you are connecting to databases on the fly. Search the archives = for some examples of this. We use this for purposes similar like = yours.

 

Niels


From: Zsolt = Koppany [mailto:zkoppanylist@intland.com]
Sent: Friday, October 17, = 2008 6:41 AM
To: = user-java@ibatis.apache.org
Subject: RE: 2.3.4.726 = and XmlConverter

 

I’m not = sure whether my problem is clear. Please check the code below (just an = example). The expression ${INT_NULL_FIELD_VALUE} has different value on different = database thus during the xml file is read we transfer the expression into a = database dependent string.

 =

I understand = that we could do that setting the property from Dao but in this case the Dao = would be database dependent what we don’t = like.

 =

Zsolt<= /span>

 =

   = ;         <select id=3D"loadBlob" = parameterClass=3D"java.util.Map" resultMap=3D"inputStreamResult" = >

   = ;            =           SELECT $queryParams.fileNameField$ as = fileName,

   = ;            =             &= nbsp;         <isEqual property=3D"fetchBlob" = compareValue=3D"true">

   = ;            =             &= nbsp;           &n= bsp;         LENGTH($queryParams.blobFieldName$) AS = length,

   = ;            =             &= nbsp;           &n= bsp;         $blobFetchStmt$ AS blobData

   = ;            =             &= nbsp;         </isEqual>

   = ;            =             &= nbsp;         <!-- even when no need to fetch blob, still have to select a null = value, to get the resultmaps satisfied -->

   = ;            =             &= nbsp;         <isEqual property=3D"fetchBlob" = compareValue=3D"false">

   = ;            =             &= nbsp;           &n= bsp;         ${INT_NULL_FIELD_VALUE} AS length,

   = ;            =             &= nbsp;           &n= bsp;         NULL AS blobData

   = ;            =             &= nbsp;         </isEqual>

   = ;            =             FROM $queryParams.tableName$

   = ;            =            WHERE = $queryParams.idFieldName$=3D#id#

   = ;         </select>

 =

Zsolt


From: Clinton Begin [mailto:clinton.begin@gmail.com]
Sent: Friday, October 17, = 2008 4:09 AM
To: = user-java@ibatis.apache.org
Subject: Re: 2.3.4.726 = and XmlConverter

 

I don't think Zsolt is talking about the XML results/parameters support in iBATIS.  XMLConverter was a class = used to literally translate iBATIS 1.x mapping files into iBATIS 2.x mapping = files using XSLT. It allowed either runtime conversion or batch = conversion. 

 

Zsolt could use the old version to do the = one-time conversion of all of his files if he wants, but it sounds like he is = extending the class for some reason, in which case he could just grab the code and = make it his own.

 

Clinton

On Thu, Oct 16, 2008 at 5:02 PM, <Christopher.Mathrusse@sy= base.com> wrote:


As a suggestion Zsolt, iBatis does OR mapping extremely well. What you are looking for is = something that will map Objects into XML extremely well. Why not take a look at = XStream by thoughtworks. I'm using their library for several projects pertaining = to Object -> XML and it handles them exceptionally well. And by = utilizing a library like this it will give you a clean separation of concern as well = as better control over the XML that you want to = generate.

http://xstream.codehaus.org/

"Clinton Begin" <clinton.begin@gmail.com> =

10/16/2008 03:42 PM

Please respond to

To

cc

 

Subject

Re: 2.3.4.726 and = XmlConverter

 

 

 

 

 

 




Zsolt,

This feature is really old and was only there to support 1.x clients = during the transition to 2.x.  If you're still have 1.x maps, it might be a = good time to move them.  Otherwise, consider it a deprecated feature. =  Thus, the long-term solution is for you to either adopt the code as your own, = or migrate your SQL mapping files.

cheers
Clinton

On Thu, Oct 16, 2008 at 2:56 PM, Zsolt Koppany <zkoppanylist@intland.com> wrote:
Larry,

are there better options that will work long term?

What is the recommended way today?

Zsolt


> -----Original Message-----
> From: Larry Meadors [mailto:larry.meadors@gmail.com]
> Sent: Thursday, October 16, 2008 3:55 PM
> To: user-java@ibatis.apache.org
> Subject: Re: 2.3.4.726 and XmlConverter
>
> Two options:
>
>  - stick with the older version of ibatis that has all the = parts you need
>  - extract the parts you need from the older version of ibatis = and use
> them alongside the new release
>
> Larry

 

------_=_NextPart_001_01C93025.9A46E852--