public void bindDelete ( PreparedStatement stmt , ClassDescriptor cld , Object obj ) throws SQLException { if ( cld . getDeleteProcedure ( ) != null ) { this . bindProcedure ( stmt , cld , obj , cld . getDeleteProcedure ( ) ) ; } else { int index = 1 ; ValueContainer [ ] values , currentLockingValues ; currentLockingValues = cld . getCurrentLockingValues ( obj ) ; // parameters for WHERE-clause pk values = getKeyValues ( m_broker , cld , obj ) ; for ( int i = 0 ; i < values . length ; i ++ ) { setObjectForStatement ( stmt , index , values [ i ] . getValue ( ) , values [ i ] . getJdbcType ( ) . getType ( ) ) ; index ++ ; } // parameters for WHERE-clause locking values = currentLockingValues ; for ( int i = 0 ; i < values . length ; i ++ ) { setObjectForStatement ( stmt , index , values [ i ] . getValue ( ) , values [ i ] . getJdbcType ( ) . getType ( ) ) ; index ++ ; } } }
binds the objects primary key and locking values to the statement BRJ