Code example for ResultSet

Methods: getInt, getString, getTime, getTimestamp

0
 
	private class AnalysisJobRowMapper implements RowMapper { 
 
		public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
			AnalysisJob analysisJob = new AnalysisJob();
			analysisJob.setJobId(rs.getString("JOB_ID"));
			analysisJob.setQueueName(rs.getString("QUEUE_NAME"));
			analysisJob.setStatusTypeId(rs.getInt("STATUS_TYPE_ID"));
			analysisJob.setDomainId(rs.getString("DOMAIN_ID"));
			analysisJob.setProjectId(rs.getString("PROJECT_ID"));
			analysisJob.setUserId(rs.getString("USER_ID"));
			analysisJob.setRequestXml(rs.getString("REQUEST_XML"));
			analysisJob.setCreateDate(rs.getTimestamp("CREATE_DATE"));
			analysisJob.setUpdateDate(rs.getTime("UPDATE_DATE"));
			return analysisJob;
		} 
	} 
 
}