ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: oracle XmlType
Date Fri, 10 Nov 2006 16:51:00 GMT
What class is returned from getter.getResultSet()?

If you have logging enabled, you might be getting iBATIS' result set proxy
instead of the underlying result set.

Does it work differently if you enable or disable logging?

Jeff Butler




On 11/10/06, Timo Schnölzer <tschnoelzer@nsdcom.de> wrote:
>
> Hi Folks,
>
> I am using the Ibatis mapping tool for long and want to map XmlType from
> Oracle.
> I registerd the XMLTypeHandlerCallbackand the system is running into the
> getResult Method
> returning the UnsupportedOperationException  error:
>
> if (getter.getResultSet() instanceof OracleResultSet) {
>                        OPAQUE opaqueValue = getOpaqueValue(getter);
>                        if (opaqueValue != null) {
>                                XMLType xmlResult = XMLType.createXML
> (opaqueValue);
>                                return xmlResult.getDOM();
>                        } else {
>                                return (Document) null;
>                        }
>                } else {
>                        throw new UnsupportedOperationException(
>                                        "XMLType mapping only supported for
> Oracle RDBMS");
> }
>
> Has anyone out there running example with the mapping and Object ?
>
> I am using "SELECT 1 as id, xmlelement("Flat", xmlattributes(z.floors..... "
>
> With:
>
>        <resultMap id="houseResult" class="houseData">
>                <result property="id" column="id" />
>                <result property="xmlValue" column="xmlValue"/>
>        </resultMap>
>
>        <select id="getHouseXML"
>                resultMap=" houseResult "> select ...
>
> and:
>
> import org.w3c.dom.Document;
>
> public class House {
>
>        private Integer id;
>
>        private Document xmlValue;
>
>        public Document getXmlValue() {
>                return xmlValue;
>        }
>
>        public void setXmlValue(Document xmlValue) {
>                this.xmlValue = xmlValue;
>        }
>
>        public Integer getId() {
>                return id;
>        }
>
>        public void setId(Integer id) {
>                this.id = id;
>        }
>
> }
>
>
> Thx a lot
>
> Timo Schnölzer
>
>

Mime
View raw message