public ItemVO<Integer, Integer> mapRow(ResultSet rs, int rowNum) throws SQLException { ItemVO<Integer, Integer> item = new ItemVO<Integer, Integer>( DaoUtils.getInteger(rs, DEFAULT_TENANT_ID_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_ITEM_ID_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_ITEM_TYPE_ID_COLUMN_NAME)); return item; }
// constructor public ProfileDAOMysqlImpl(DataSource dataSource, SqlScriptService sqlScriptService) { super(sqlScriptService); setDataSource(dataSource); // output connection information if (logger.isInfoEnabled()) { try { logger.info(DaoUtils.getDatabaseURLAndUserName(dataSource)); } catch (Exception e) { logger.error(e); } } }
public Operator mapRow(ResultSet rs, int rowNum) throws SQLException { // Date lastlogin = DaoUtils.getDateIfPresent(rs,DEFAULT_LAST_LOGIN_DATE_COLUMN_NAME); return new Operator( DaoUtils.getStringIfPresent(rs, DEFAULT_OPERATORID_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_PASSWORD_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_FIRSTNAME_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_LASTNAME_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_EMAIL_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_PHONE_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_COMPANY_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_ADDRESS_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_APIKEY_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_IP_COLUMN_NAME), DaoUtils.getBoolean(rs, DEFAULT_ACTIVE_COLUMN_NAME), // DaoUtils.getDateIfPresent(rs, DEFAULT_CREATIONDATE_COLUMN_NAME).toString(), DaoUtils.getStringIfPresent(rs, DEFAULT_CREATIONDATE_COLUMN_NAME), DaoUtils.getIntegerIfPresent(rs, DEFAULT_ACCESSLEVEL_COLUMN_NAME), DaoUtils.getIntegerIfPresent(rs, DEFAULT_LOGIN_COUNT_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_LAST_LOGIN_DATE_COLUMN_NAME) // lastlogin!=null?lastlogin.toString():null ); }