ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhaarat Sharma <bhaara...@gmail.com>
Subject using iBatis for API
Date Thu, 24 Sep 2009 18:00:33 GMT

Apologies if this question sounds weird.

We are in a system where we use stored procedures extensively.  We use
iBatis for this.  However, now we are provided with API's so instead
of using stored procedures we will be using the api's.  As a result,
we will have to convert all our code that is in iBatis to use the API.

Before starting on that I wanted to inquire if there was any way
possible to use iBatis to call the API method instead of calling the
Stored Procedure? that way our lives will be much simpler since we
wont have to change existing code a lot.

As an example. Here is the iBatis mapping for one of the SP's:
    <parameterMap id="getOHUserNameDetailsParm" class="map">
        <parameter property="userId" jdbcType="String"
javaType="java.lang.String" mode="IN"/>

    <resultMap id="getOHUserNameDetailsResults" class="java.util.HashMap">
        <result property="firstName" column="user_first_name"/>
        <result property="middleIni" column="user_mi"/>
        <result property="lastName" column="user_last_name"/>

    <procedure id="getOHUserNameDetails"
        {call sp_read_user(?)}

the API method for this will be:
Name		: getUser
Parameter	        : userID
EJB		        : UserManager
Parameter	      Data_Type	      Description
userID	      String	              User ID (mandatory)
Parameter	      Data_Type	      Description
User Object     User	              User Object List


To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org

View raw message