Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader
In directory sc8-pr-cvs1:/tmp/cvs-serv13811/loader
Modified Files:
Loader.java
Log Message:
bugfixes from 2.0 stream
* now uses interface proxies correctly
* bugfixes to Filters
* reference to self for a native id
Index: Loader.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader/Loader.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** Loader.java 20 Mar 2003 13:58:46 -0000 1.36
--- Loader.java 16 Apr 2003 06:30:51 -0000 1.37
***************
*** 143,148 ****
final List results = new ArrayList(); //new cirrus.hibernate.collections.List(this);
! final PreparedStatement st = prepareQueryStatement( getSQLString(), values, types, selection, false, session );
! final ResultSet rs = getResultSet(st, namedParams, selection, session);
try {
--- 143,148 ----
final List results = new ArrayList(); //new cirrus.hibernate.collections.List(this);
! final PreparedStatement st = prepareQueryStatement( getSQLString(), values, types, namedParams, selection, false, session );
! final ResultSet rs = getResultSet(st, selection, session);
try {
***************
*** 411,415 ****
* Obtain a <tt>PreparedStatement</tt> and bind JDBC-style <tt>?</tt> parameters
*/
! protected final PreparedStatement prepareQueryStatement(String sql, Object[] values, Type[] types, QueryImpl.RowSelection selection, boolean scroll, SessionImplementor session) throws SQLException, HibernateException {
boolean scrollable = selection!=null &&
--- 411,415 ----
* Obtain a <tt>PreparedStatement</tt> and bind JDBC-style <tt>?</tt> parameters
*/
! protected final PreparedStatement prepareQueryStatement(String sql, Object[] values, Type[] types, Map namedParams, QueryImpl.RowSelection selection, boolean scroll, SessionImplementor session) throws SQLException, HibernateException {
boolean scrollable = selection!=null &&
***************
*** 420,424 ****
try {
!
if (selection!=null && selection.timeout!=null) st.setQueryTimeout( selection.timeout.intValue() );
--- 420,424 ----
try {
!
if (selection!=null && selection.timeout!=null) st.setQueryTimeout( selection.timeout.intValue() );
***************
*** 429,432 ****
--- 429,434 ----
}
+ bindNamedParameters(st, namedParams, types.length, session);
+
}
catch (SQLException sqle) {
***************
*** 468,474 ****
* returning an SQL <tt>ResultSet</tt>
*/
! private final ResultSet getResultSet(PreparedStatement st, Map namedParams, QueryImpl.RowSelection selection, SessionImplementor session) throws SQLException, HibernateException {
try {
- bindNamedParameters(st, namedParams, session);
setMaxRows(st, selection);
ResultSet rs = st.executeQuery();
--- 470,475 ----
* returning an SQL <tt>ResultSet</tt>
*/
! private final ResultSet getResultSet(PreparedStatement st, QueryImpl.RowSelection selection, SessionImplementor session) throws SQLException, HibernateException {
try {
setMaxRows(st, selection);
ResultSet rs = st.executeQuery();
***************
*** 481,488 ****
throw sqle;
}
- catch (HibernateException he) {
- closePreparedStatement(st, selection, session);
- throw he;
- }
}
--- 482,485 ----
***************
*** 491,495 ****
* superclass and should be implemented by subclasses (queries) which allow named parameters.
*/
! protected void bindNamedParameters(PreparedStatement st, Map namedParams, SessionImplementor session) throws SQLException, HibernateException {}
/**
--- 488,492 ----
* superclass and should be implemented by subclasses (queries) which allow named parameters.
*/
! protected void bindNamedParameters(PreparedStatement st, Map namedParams, int start, SessionImplementor session) throws SQLException, HibernateException {}
/**
|