ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vishalj <Vish...@ivycomptech.com>
Subject Re: stored procedure in iBatis 3
Date Thu, 07 Jan 2010 05:15:54 GMT

It would be a great help if you can give me the mapping for 

CREATE OR REPLACE
PROCEDURE TEST_SP
   (streetIn IN VARCHAR,streetOut OUT VARCHAR)
AS

BEGIN
  INSERT INTO TEST_ADDRESS values(1,streetIn) ;
  streetOut:=streetIn;
END;


I want to pass in a Address Object and get Back a Address Object Back ,the
java Class for Address Object looks like this 

public class Address {
	
	private String street;

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

}





Clinton Begin wrote:
> 
> Yes, stored procs are mapped exactly like every other statement in iBATIS
> 3,
> but you set the statementType attribute to CALLABLE.
> 
> Page 22 discusses this a little (although I agree, not enough).
> 
> <insert id="myProc" statementType="CALLABLE">
> {your java proc call here - same syntax as JDBC}
> </insert>
> 
> Parameters can still be set to IN, OUT or INOUT.
> 
> We've eliminated the <procedure> element, as it wasn't descriptive enough.
> 
> Clinton
> 
> 
> On Wed, Jan 6, 2010 at 12:06 AM, vishalj <VishalJ@ivycomptech.com> wrote:
> 
>>
>> How do i map  execute Stored Procedures in DB for iBatis 3.The
>> documentation
>> does not talk about that
>> --
>> View this message in context:
>> http://old.nabble.com/stored-procedure-in-iBatis-3-tp27026799p27026799.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/stored-procedure-in-iBatis-3-tp27026799p27052357.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


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


Mime
View raw message