Consider the following source snippets:
Snippet #1
StoredProcedure sp = new StoredProcedure( "PROC_NAME", getConnection() );
sp.putParameter( "ID", getId() );
sp.execute();
Snippet #2
StoredProcedure sp = new StoredProcedure( "PROC_NAME" );
sp.setConnection( getConnection() );
sp.putParameter( "ID", getId() );
sp.execute();
Snippet #3
StoredProcedure sp = new StoredProcedure( "PROC_NAME" );
sp.putParameter( "ID", getId() );
sp.execute( getConnection() );
Q: Which snippet is the most object-oriented, and why?
Q: What are the pros and cons of each snippet?