com.waveset.adapter
Class SQLServerResourceAdapter.SQLServerAccountIterator2

java.lang.Object
  extended bycom.waveset.adapter.SQLServerResourceAdapter.SQLServerAccountIterator2
All Implemented Interfaces:
AccountIterator
Enclosing class:
SQLServerResourceAdapter

public static class SQLServerResourceAdapter.SQLServerAccountIterator2
extends java.lang.Object
implements AccountIterator

The implementation of the AccountIterator returned by getAccountIterator. This implementation iterates over the sp_helpusers table, which is convenient, but it doesn't include login objects which haven't been granted database access. Since we need to expose logins without security acccounts, this is probably not of much use.


Field Summary
 
Fields inherited from interface com.waveset.adapter.AccountIterator
code_id
 
Constructor Summary
SQLServerResourceAdapter.SQLServerAccountIterator2(java.sql.Connection con, SQLServerResourceAdapter adapter)
          Construct the iterator, run the query, and load the first user.
 
Method Summary
 void close()
          Release resources required for the iteration.
 boolean hasNext()
          Return true if there are more users.
 WSUser next()
          Returns the next user object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLServerResourceAdapter.SQLServerAccountIterator2

public SQLServerResourceAdapter.SQLServerAccountIterator2(java.sql.Connection con,
                                                          SQLServerResourceAdapter adapter)
                                                   throws WavesetException
Construct the iterator, run the query, and load the first user.

If we hit an error, auto-close so the caller doesn't have to worry about it.

Method Detail

close

public void close()
Release resources required for the iteration.

Specified by:
close in interface AccountIterator

hasNext

public boolean hasNext()
                throws WavesetException
Return true if there are more users.

Specified by:
hasNext in interface AccountIterator
Throws:
WavesetException

next

public WSUser next()
            throws java.util.NoSuchElementException
Returns the next user object. If the _eof flag isn't set, we've advanced the cursor to the first row of information for the next user.

Specified by:
next in interface AccountIterator
Returns:
the next account

Throws:
java.util.NoSuchElementException