use of com.ramussoft.net.common.Group in project ramus by Vitaliy-Yakovchuk.
the class UserFactoryImpl method createUser.
private User createUser(PreparedStatement groups, ResultSet rs, PreparedStatement groupQualifiers) throws SQLException {
User user = new User();
user.setName(rs.getString("name").trim());
String login = rs.getString("login").trim();
user.setLogin(login);
user.setPassword(rs.getString("password").trim());
groups.setString(1, login);
ResultSet grs = groups.executeQuery();
while (grs.next()) {
Group group = new Group();
group.setName(grs.getString("group_name").trim());
fillGroup(group, groupQualifiers);
user.getGroups().add(group);
}
grs.close();
return user;
}
Aggregations