1   /*******************************************************************************
2    *  Copyright (c) 2005, 2006 Imola Informatica.
3    *  All rights reserved. This program and the accompanying materials
4    *  are made available under the terms of the LGPL License v2.1
5    *  which accompanies this distribution, and is available at
6    *  http://www.gnu.org/licenses/lgpl.html
7    *******************************************************************************/
8   /**
9    * 
10   */
11  package it.imolinfo.jbi4cics.test.tappo.storedprocedure;
12  
13  
14  /**
15   * @author raffaele
16   *
17   */
18  public class TappoStoredProcedure {
19  
20    /**
21     * 
22     *//*
23    public TappoStoredProcedure() {
24      super();
25      // TODO Auto-generated constructor stub
26    }
27  
28    *//**
29     * @param args
30     *//*
31    public static void test_inout(String[] args) throws SQLException {
32      try {
33        Connection conn = DriverManager.getConnection("jdbc:default:connection");
34        String paramIn=args[0];
35        System.out.println("esecuzione TappoSP.test_inout, input data: "+paramIn);
36        PreparedStatement prep=conn.prepareStatement("select id,output_data from jbi4cics.tappo where input_data=?");
37        prep.setString(1,paramIn);
38        ResultSet rs=prep.executeQuery();
39        rs.next();
40        String paramOut=rs.getString("output_data");
41        args[0]=paramOut;
42        System.out.println("esecuzione TappoSP.test_inout, ouput data: "+paramOut);
43        rs.close();
44        prep.close();
45        conn.close();
46      }
47      catch (SQLException e){
48        e.printStackTrace();
49        throw e;
50      }
51    }
52    
53    *//**
54     * @param args
55     *//*
56    public static void test_rs(String[] args,ResultSet[] argRs) throws SQLException {
57      try {
58        Connection conn = DriverManager.getConnection("jdbc:default:connection");
59        String paramIn=args[0];
60        System.out.println("esecuzione TappoSP.test_rs, input data: "+paramIn);
61        PreparedStatement prep=conn.prepareStatement("select id,output_data from jbi4cics.tappo where input_data=?");
62        prep.setString(1,paramIn);
63        ResultSet rs=prep.executeQuery();
64        rs.next();
65        String paramOut=rs.getString("output_data");
66        args[0]=paramOut;
67        System.out.println("esecuzione TappoSP.test_rs, ouput data: "+paramOut);
68        rs.close();
69        prep.close();
70        PreparedStatement prep1=conn.prepareStatement("select id,input_data,output_data from jbi4cics.tappo");      
71        ResultSet rs1=prep1.executeQuery();      
72        argRs[0]=rs1;
73        System.out.println("esecuzione TappoSP.test_rs, ouput rs: "+rs1);;      
74        conn.close();
75      }
76      catch (SQLException e){
77        e.printStackTrace();
78        throw e;
79      }
80    }  */
81  
82  }