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: Parameters to store procedure
Date Sat, 02 Sep 2006 20:06:53 GMT
iBATIS resultMap/resultClass objects are only used for result sets.  Since
your procedure does not return a result set, they will not work.

In your case, since you are using a Map as a parameter object, the result
should be available in the Map after you call the procedure.

Jeff Butler


On 9/1/06, Javier Leyba <xleyba@gmail.com> wrote:
>
> Hi
>
> I´ve a store procedure that receive two parameters: one input and one
> output with the result of the operation.
>
> I'm in nightmare trying to set up a map for this.
>
> I don't want to create a class to pass parameters so I tried to pass
> inline parameters but I really couldn´t understand how ti works with
> iBatis.
>
> I did:
>
> ----------
> public class GenericResult implements Serializable {
>        private Integer result;
>
>        public Integer getResult() {
>                return result;
>        }
>
>        public void setResult(Integer result) {
>                this.result = result;
>        }
> }
> ----------
> <procedure id="deleteNotification"
>        resultClass="Notification.genericResult" parameterClass="
> java.util.Map">
>        <![CDATA[
>                {call
> deleteNotification(#notificationId,mode=IN#,#result,mode=OUT#)}
>        ]]>
> </procedure>
> ----
>
>
> But it don´t work. How should I do this ?
>
> Thanks in advance
>
>
>
> --
> Javier Leyba
> Barcelona - Spain
> http://blog.leyba.com.ar
>

Mime
View raw message