public Set < Long > selectTermIds ( final String name ) throws SQLException { Connection conn = null ; PreparedStatement stmt = null ; ResultSet rs = null ; Set < Long > ids = Sets . newHashSetWithExpectedSize ( 4 ) ; try { conn = connectionSupplier . getConnection ( ) ; stmt = conn . prepareStatement ( selectTermIdsSQL ) ; stmt . setString ( 1 , name ) ; rs = stmt . executeQuery ( ) ; while ( rs . next ( ) ) { ids . add ( rs . getLong ( 1 ) ) ; } return ids ; } finally { SQLUtil . closeQuietly ( conn , stmt , rs ) ; } }
Selects the term ids for all with the specified name .