title: How to call oracle stored procedure using mybatis (annotation based.)
body: <p>I need to call an oracle stored procedure in java using mybatis.The stored procedure and things so far i have tried is given below.</p>
  
  <p>Stored Procedure:</p>
  
  <pre><code>create or replace PROCEDURE P_GET_ACCOUNT (INVAR_ACCOUNT IN DATE 
                                           , OUTVAR_CONFIG OUT SYS_REFCURSOR) AS begin
       OPEN OUTVAR_CONFIG FOR
            SELECT * from accounts; END P_GET_ACCOUNT;
  </code></pre>
  
  <p>To call this stored procedure i called the mapper</p>
  
  <p>AccountImplMapper.java</p>
  
  <pre><code>@Select("{CALL P_GET_ACCOUNT(#{account, mode=IN, jdbcType=VARCHAR}," +
                                       "#{result, mode=OUT, jdbcType=CURSOR})}")
  @Options(statementType = StatementType.CALLABLE)
  AccountImpl selectAccount(@Param("account") String account,@Param("result") Object result);
  </code></pre>
  
  <p>The AccountImplMapper method is called in DatabaseImpl</p>
  
  <p>DatabaseImpl.java:</p>
  
  <pre><code>AccountImpl = new AccountImpl();
  accountImpl =  accountImplMapper.selectAccount("mark",accountImpl);
  </code></pre>
  
  <p>Where AccountImpl is the model class for my database table account.When i run this i am not able to get the values from the database.Please help me solve this issue.</p>