Search in sources :

Example 1 with FactoryUser

use of org.cerberus.crud.factory.impl.FactoryUser in project cerberus-source by cerberustesting.

the class UserDAO method loadFromResultSet.

private User loadFromResultSet(ResultSet rs) throws SQLException {
    int userID = ParameterParserUtil.parseIntegerParam(rs.getString("usr.userid"), 0);
    String login = ParameterParserUtil.parseStringParam(rs.getString("usr.login"), "");
    String password = ParameterParserUtil.parseStringParam(rs.getString("usr.password"), "");
    String resetPasswordToken = ParameterParserUtil.parseStringParam(rs.getString("usr.resetPasswordToken"), "");
    String request = ParameterParserUtil.parseStringParam(rs.getString("usr.request"), "");
    String name = ParameterParserUtil.parseStringParam(rs.getString("usr.name"), "");
    String team = ParameterParserUtil.parseStringParam(rs.getString("usr.team"), "");
    String language = ParameterParserUtil.parseStringParam(rs.getString("usr.language"), "");
    String reportingFavorite = ParameterParserUtil.parseStringParam(rs.getString("usr.reportingFavorite"), "");
    String robotHost = ParameterParserUtil.parseStringParam(rs.getString("usr.robotHost"), "");
    String defaultSystem = ParameterParserUtil.parseStringParam(rs.getString("usr.defaultSystem"), "");
    String email = ParameterParserUtil.parseStringParam(rs.getString("usr.email"), "");
    String robotPort = ParameterParserUtil.parseStringParam(rs.getString("usr.robotPort"), "");
    String robotPlatform = ParameterParserUtil.parseStringParam(rs.getString("usr.robotPlatform"), "");
    String robotBrowser = ParameterParserUtil.parseStringParam(rs.getString("usr.robotBrowser"), "");
    String robotVersion = ParameterParserUtil.parseStringParam(rs.getString("usr.robotVersion"), "");
    String robot = ParameterParserUtil.parseStringParam(rs.getString("usr.robot"), "");
    String userPreferences = ParameterParserUtil.parseStringParam(rs.getString("usr.userPreferences"), "");
    // TODO remove when working in test with mockito and autowired
    factoryUser = new FactoryUser();
    return factoryUser.create(userID, login, password, resetPasswordToken, request, name, team, language, reportingFavorite, robotHost, robotPort, robotPlatform, robotBrowser, robotVersion, robot, defaultSystem, email, userPreferences);
}
Also used : FactoryUser(org.cerberus.crud.factory.impl.FactoryUser) IFactoryUser(org.cerberus.crud.factory.IFactoryUser)

Aggregations

IFactoryUser (org.cerberus.crud.factory.IFactoryUser)1 FactoryUser (org.cerberus.crud.factory.impl.FactoryUser)1