public synchronized Vector getAllUsers(Connection connection)
throws PersistenceException {
PreparedStatement getUsers = null;
ResultSet set = null;
User user = null;
Vector result = new Vector();
try {
getUsers = connection.prepareStatement(
"select * from users");
set = getUsers.executeQuery();
while (set.next()) {
user = new User(set.getString(1), set.getString(2));
result.add(user);
}
} catch (Exception error) {
throw new PersistenceException("Users.getAllUsers failed ",
error);