Mapping an Array of String

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapping an Array of String

Mr.Squirrel
hello,

i am calling an oracle stored procedure which return the type "TABLE OF VARCHAR2" (as output parameter)
How can i map this type to the java type "String []"  ?

SqlMap.xml :
<parameterMap id="calculDroits" class="CalculDroits">
    <parameter property="seqFormation" jdbcType="ARRAY" javaType="java.lang.String[]" mode="OUT" />
</parameterMap>           

<procedure id="pCalculDroits" parameterMap="calculDroits">
            { call pbw_calculDroitsReins.Du(?) }
</procedure>


JavaBean CalculDroits.java :
public class CalculDroits implements Serializable{

        private static final long serialVersionUID = 9014779368033647012L;
       
        private String[] codesDroit;

        public String[] getCodesDroit() {
                return codesDroit;
        }
        public void setCodesDroit(String[] codesDroit) {
                this.codesDroit = codesDroit;
        }
}

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Mapping an Array of String

Larry Meadors
FYI: The ibatis project has moved and been renamed.

It is no longer being maintained as an Apache project, but has moved
(along with the development team) here:

http://www.mybatis.org/

Please join us at the new location by joining the mailing list here:

http://groups.google.com/group/mybatis-user

Larry


On Tue, Jun 1, 2010 at 8:14 AM, Mr.Squirrel
<[hidden email]> wrote:

>
> hello,
>
> i am calling an oracle stored procedure which return the type "TABLE OF
> VARCHAR2" (as output parameter)
> How can i map this type to the java type "String []"  ?
>
> SqlMap.xml :
> <parameterMap id="calculDroits" class="CalculDroits">
>        <parameter property="seqFormation" jdbcType="ARRAY"
> javaType="java.lang.String[]" mode="OUT" />
> </parameterMap>
>
> <procedure id="pCalculDroits" parameterMap="calculDroits">
>            { call pbw_calculDroitsReins.Du(?) }
> </procedure>
>
>
> JavaBean CalculDroits.java :
> public class CalculDroits implements Serializable{
>
>        private static final long serialVersionUID = 9014779368033647012L;
>
>        private String[] codesDroit;
>
>        public String[] getCodesDroit() {
>                return codesDroit;
>        }
>        public void setCodesDroit(String[] codesDroit) {
>                this.codesDroit = codesDroit;
>        }
> }
>
> Thank you
> --
> View this message in context: http://old.nabble.com/Mapping-an-Array-of-String-tp28742440p28742440.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]