Code example for ResultSet

Methods: getLong, getTimestamp

0
	 * @see org.springframework.jdbc.object.MappingSqlQuery#mapRow(java.sql.ResultSet, int) 
	 */ 
	@Override 
	protected Stats mapRow(ResultSet rs, int rowNumber) throws SQLException {
		Stats stats = new Stats();
		stats.setId(rs.getLong("id"));
		stats.setMillis(rs.getLong("millis"));
		stats.setRxBytes(rs.getLong("rxbytes"));
		stats.setTxBytes(rs.getLong("txbytes"));
		stats.setCreated(new Date(rs.getTimestamp("created").getTime()));
		return stats;
	} 
}