calling a java object in the stored procedure as an argument
<p>I wanted to know whether we can pass a java object inside the stored procedure call as an argument. Here is my java code where i have used the stored procedure call. Please help me in finding the solution for this</p>

<pre><code>public void addPatientInfo(PatientInfo patientInfo) throws SQLException
{   
    CallableStatement cst = null;

    try {
        logger.info("Enter addPatientInfo");
        dbConnection = DbConnectionImpl.getDbConnection(dbConnInfo);
        dbConnection.setAutoCommit(false);
        cst = dbConnection.prepareCall("{ call add_patient(?,?,?,?,?,?,?,?,?,?) }");

        cst.setInt(1, patientInfo.getSalutationType().getSalutationTypeId());
        cst.setString(2, patientInfo.getFirstName());
        cst.setString(3, patientInfo.getMiddleName());
        cst.setString(4, patientInfo.getLastName());
        cst.setString(5, patientInfo.getGender());
        cst.setString(6, patientInfo.getDob());
        cst.setString(7, patientInfo.getOccupation());
        cst.setInt(8, ApplicationConstants.OWNER_TYPE_PATIENT);
        cst.setString(9, patientInfo.getEducation());
        cst.setString(10,patientInfo.getPatientIdentityNo());

        cst.execute();
        dbConnection.commit();
    }
</code></pre>
