ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Selva <selva.an...@gmail.com>
Subject Re: mapping flat data int list of objects
Date Fri, 15 Jan 2010 07:57:43 GMT
i use iBatis 2 not 3, and i solved this using a TypeHandlerCallback.
1) in my sqlMapConfig.xml i declared the use of the type handler:
2) i've implemented the iBAtis interface
com.ibatis.sqlmap.client.extensions.TypeHandlerCallback and defined the
methods to write and read from DB column.

If i rebemeber correctly an example of this is in guide or tutorial pdfs on
the iBatis site

Best regards

On Thu, Jan 14, 2010 at 10:11 PM, Remijan, Michael <
Michael.Remijan@suddenlink.com> wrote:

> I have a legacy database which contains. A flat structure for addresses
> like this:
> homeAddress|homeCity|homeState|homeZip|workAddress|workCity|workState|workZip.
> I would like to map this into a List<Address> objects where the “home”
> address uses Enumeration AddressType.HOME  and “work” address type uses
> Enumeration AddressType.WORK.
> How would I go about doing this with iBatis?
>  "The information transmitted is intended only for the person or entity to
> which it is addressed and may contain proprietary, confidential and/or
> legally privileged material. Any review, retransmission, dissemination or
> other use of, or taking of any action in reliance upon, this information by
> persons or entities other than the intended recipient is prohibited. If you
> received this in error, please contact the sender and delete the material
> from all computers."

View raw message