public void bindSelect ( PreparedStatement stmt , Identity oid , ClassDescriptor cld , boolean callableStmt ) throws SQLException { ValueContainer [ ] values = null ; int i = 0 ; int j = 0 ; if ( cld == null ) { cld = m_broker . getClassDescriptor ( oid . getObjectsRealClass ( ) ) ; } try { if ( callableStmt ) { // First argument is the result set m_platform . registerOutResultSet ( ( CallableStatement ) stmt , 1 ) ; j ++ ; } values = getKeyValues ( m_broker , cld , oid ) ; for ( /*void*/ ; i < values . length ; i ++ , j ++ ) { setObjectForStatement ( stmt , j + 1 , values [ i ] . getValue ( ) , values [ i ] . getJdbcType ( ) . getType ( ) ) ; } } catch ( SQLException e ) { m_log . error ( "bindSelect failed for: " + oid . toString ( ) + ", PK: " + i + ", value: " + values [ i ] ) ; throw e ; } }
Binds the Identities Primary key values to the statement .