All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.dialect.DataDirectOracle9Dialect Maven / Gradle / Ivy

There is a newer version: 6.5.0.CR2
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.dialect;

import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * A Dialect for accessing Oracle through DataDirect driver
 */
@SuppressWarnings("deprecation")
public class DataDirectOracle9Dialect extends Oracle9Dialect {
	@Override
	public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException {
		return col;
	}

	@Override
	public ResultSet getResultSet(CallableStatement ps) throws SQLException {
		boolean isResultSet = ps.execute();
		// This assumes you will want to ignore any update counts
		while (!isResultSet && ps.getUpdateCount() != -1) { 
			isResultSet = ps.getMoreResults();
		}

		return ps.getResultSet();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy