Yes, since resultSet
and rs
are two references pointing to the same object.
I wouldn't pass around your resultset normally since you want to control the closure of it (and prevent a resource leak). I would rather get it, iterate through and build a set of objects relating to its results, close the result set and hand back your resultant collection of objects from the database.