How to call Oracle function which retrun Oracle record type?
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
Tural Muradbeyli <tural.muradbe... @gmail.com>
Date: Wed, 5 Sep 2012 22:08:03 -0700 (PDT)
Local: Thurs, Sep 6 2012 1:08 am
Subject: How to call Oracle function which retrun Oracle record type?
I have record type in package specification:
TYPE Payment_Capabilities IS RECORD( pp_partial_payment NUMBER(1) DEFAULT 0, co_advance_payment NUMBER(1) DEFAULT 0, dp_deposit_payment NUMBER(1) DEFAULT 0, dr_deposit_repay NUMBER(1) DEFAULT 0, wp_wallet_payment NUMBER(1) DEFAULT 0, wr_wallet_repay NUMBER(1) DEFAULT 0, ss_prepaid_payment NUMBER(1) DEFAULT 0);
and function which returns this type. I use MyBatis integration with Spring. How to call (using MyBatis XML Mapper) this function and map result to POJO object?
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Guy Rouillier <guy.rouill... @gmail.com>
Date: Fri, 07 Sep 2012 16:06:45 -0400
Local: Fri, Sep 7 2012 4:06 pm
Subject: Re: How to call Oracle function which retrun Oracle record type?
Can you show us an example of how you would do this with straight Java
and JDBC, without MyBatis? I found the following article using Google:
http://betteratoracle.com/posts/31-passing-record-types-between-oracl... .
Based on the fact that you need to use Oracle-specific Java classes -
oracle.sql instead of java.sql - my guess would be that this cannot be
done with MyBatis.
On 9/6/2012 1:08 AM, Tural Muradbeyli wrote:
> I have record type in package specification:
> | TYPEPayment_Capabilities IS RECORD( pp_partial_payment NUMBER(1)
> DEFAULT0, co_advance_payment NUMBER(1) DEFAULT0, dp_deposit_payment
> NUMBER(1) DEFAULT0, dr_deposit_repay NUMBER(1) DEFAULT0,
> wp_wallet_payment NUMBER(1) DEFAULT0, wr_wallet_repay NUMBER(1)
> DEFAULT0, ss_prepaid_payment NUMBER(1) DEFAULT0);
> |and function which returns this type. I use MyBatis integration with
> Spring. How to call (using MyBatis XML Mapper) this function and map
> result to POJO object?
--
Guy Rouillier
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Dridi Boukelmoune <dridi.boukelmo... @zenika.com>
Date: Mon, 10 Sep 2012 11:13:35 +0200
Local: Mon, Sep 10 2012 5:13 am
Subject: Re: How to call Oracle function which retrun Oracle record type?
Hi,
Don't forget type handlers for specific API.
http://www.mybatis.org/core/configuration.html#typeHandlers
Dridi
http://www.zenika.com
On Fri, Sep 7, 2012 at 10:06 PM, Guy Rouillier <guy.rouill
... @gmail.com> wrote:
> Can you show us an example of how you would do this with straight Java and
> JDBC, without MyBatis? I found the following article using Google:
>
http://betteratoracle.com/posts/31-passing-record-types-between-oracl... .
> Based on the fact that you need to use Oracle-specific Java classes -
> oracle.sql instead of java.sql - my guess would be that this cannot be done
> with MyBatis.
> On 9/6/2012 1:08 AM, Tural Muradbeyli wrote:
>> I have record type in package specification:
>> | TYPEPayment_Capabilities IS RECORD( pp_partial_payment NUMBER(1)
>> DEFAULT0, co_advance_payment NUMBER(1) DEFAULT0, dp_deposit_payment
>> NUMBER(1) DEFAULT0, dr_deposit_repay NUMBER(1) DEFAULT0,
>> wp_wallet_payment NUMBER(1) DEFAULT0, wr_wallet_repay NUMBER(1)
>> DEFAULT0, ss_prepaid_payment NUMBER(1) DEFAULT0);
>> |and function which returns this type. I use MyBatis integration with
>> Spring. How to call (using MyBatis XML Mapper) this function and map
>> result to POJO object?
> --
> Guy Rouillier
--
Dridi Boukelmoune
Développeur/Formateur
GSM : +33 (0)6 17 91 14 23
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Tural Muradbeyli <tural.muradbe... @gmail.com>
Date: Tue, 16 Oct 2012 12:31:00 -0700 (PDT)
Subject: Re: How to call Oracle function which retrun Oracle record type?
> <select id="identifyPaymentCapabilities" parameterType="PaymentCapabilities" statementType="CALLABLE"> > DECLARE > v_payment_capabilities APS.Payment_Capabilities; > BEGIN > v_payment_capabilities := APS.get_payment_capabilities(#{customerId, javaType=Integer, jdbcType=NUMERIC, mode=IN});
> #{partialPaymentPP, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.pp_partial_payment; > #{advancePaymentCO, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.co_advance_payment; > #{depositPaymentDP, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.dp_deposit_payment; > #{depositRepayDR, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.dr_deposit_repay; > #{walletPaymentWP, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.wp_wallet_payment; > #{walletRepayWR, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.wr_wallet_repay; > #{prepaidPaymentSS, javaType=Integer, jdbcType=NUMERIC, mode=OUT} := v_payment_capabilities.ss_prepaid_payment; > END; > </select>
On Thursday, September 6, 2012 10:08:03 AM UTC+5, Tural Muradbeyli wrote:
> I have record type in package specification:
> TYPE Payment_Capabilities IS RECORD( > pp_partial_payment NUMBER(1) DEFAULT 0, > co_advance_payment NUMBER(1) DEFAULT 0, > dp_deposit_payment NUMBER(1) DEFAULT 0, > dr_deposit_repay NUMBER(1) DEFAULT 0, > wp_wallet_payment NUMBER(1) DEFAULT 0, > wr_wallet_repay NUMBER(1) DEFAULT 0, > ss_prepaid_payment NUMBER(1) DEFAULT 0);
> and function which returns this type. I use MyBatis integration with Spring. How to call (using MyBatis XML Mapper) this function and map result to POJO object?
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
AntPort <antonioporto... @gmail.com>
Date: Wed, 17 Oct 2012 01:31:49 -0700 (PDT)
Local: Wed, Oct 17 2012 4:31 am
Subject: Re: How to call Oracle function which retrun Oracle record type?
Please check this thread https://groups.google.com/forum/?fromgroups=#!topic/mybatis-user/ajPX...
.
You can combine solution from the thread with the article in Guy's post...
(Notice: passing STRUCT parameters to CallableStatement might not work with ojdbc14 Oracle driver, use ojdbc6 instead...)
Dana četvrtak, 6. rujna 2012. 07:08:03 UTC+2, korisnik Tural Muradbeyli napisao je:
> I have record type in package specification:
> TYPE Payment_Capabilities IS RECORD(
> pp_partial_payment NUMBER(1) DEFAULT 0,
> co_advance_payment NUMBER(1) DEFAULT 0,
> dp_deposit_payment NUMBER(1) DEFAULT 0,
> dr_deposit_repay NUMBER(1) DEFAULT 0,
> wp_wallet_payment NUMBER(1) DEFAULT 0,
> wr_wallet_repay NUMBER(1) DEFAULT 0,
> ss_prepaid_payment NUMBER(1) DEFAULT 0);
> and function which returns this type. I use MyBatis integration with Spring. How to call (using MyBatis XML Mapper) this function and map result to POJO object?
You must
Sign in before you can post messages.
You do not have the permission required to post.