|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
JdbcMapper.java | - | 0% | 0% | 0% |
|
1 |
package com.diasparsoftware.jdbc;
|
|
2 |
|
|
3 |
import java.sql.*;
|
|
4 |
import java.util.Date;
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
public class JdbcMapper { |
|
9 |
|
|
10 |
/**
|
|
11 |
* A potentially safer version of ResultSet#getDate
|
|
12 |
* which answers a timestamp at noon on the day in
|
|
13 |
* question.
|
|
14 |
*
|
|
15 |
* @param resultSet
|
|
16 |
* @param columnName
|
|
17 |
* @return
|
|
18 |
* @throws SQLException
|
|
19 |
*/
|
|
20 | 0 |
public Date getDate(ResultSet resultSet, String columnName) throws SQLException { |
21 |
|
|
22 | 0 |
return JdbcUtil.toJavaUtilDate(
|
23 |
resultSet.getTimestamp(columnName)); |
|
24 |
} |
|
25 |
|
|
26 |
} |
|
27 |
|
|